Compare commits

...

30 Commits

Author SHA1 Message Date
mrsaifullah52 11f9097024
Merge c6e53dbbc7 into 0b9290789e 2025-12-04 21:39:05 +01: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 c6e53dbbc7
Merge branch 'main' into feature/n8n-workflow 2025-11-26 08:32:19 -06:00
mrsaifullah52 93db60b8f6 Merge remote-tracking branch 'upstream/main' into feature/n8n-workflow 2025-11-22 12:25:49 +05:00
mrsaifullah52 f344e5cdc2 feat(autominator): update agent menu and documentation 2025-11-22 12:24:58 +05:00
mrsaifullah52 8a91c6fffe fix(autominator): add critical format rules to n8n helpers 2025-11-22 12:24:16 +05:00
mrsaifullah52 36ce3c42d2 feat(autominator): implement research-driven node and workflow building 2025-11-22 12:23:51 +05:00
mrsaifullah52 82b4f1dcb4 feat(autominator): add gather-requirements workflow for requirement gathering
- Create gather-requirements workflow with interactive elicitation
- Add web search integration after each question
- Research EXACT node types, typeVersions, and parameter structures from docs.n8n.io
- Store all research findings in requirements file
- Generate requirement documents with research sections
- Add template.md with research findings sections
- Add instructions.md with comprehensive elicitation steps
- Add checklist.md for validation
2025-11-22 12:22:42 +05:00
mrsaifullah52 6d1da5fc72 refactor(autominator): Replace Context7 MCP integration with web search
Updated documentation, configuration, agent persona, and workflow instructions to remove Context7 MCP references and implement web search for accessing up-to-date n8n documentation. Variables and installer prompts related to Context7 were removed for consistency.
2025-11-21 20:39:36 +05:00
mrsaifullah52 ffe6f6c26b feat(autominator): improve elicitation to focus on actual problems 2025-11-20 15:10:35 +05:00
mrsaifullah52 3fa0865542 refactor(autominator): simplify Context7 MCP recommendation 2025-11-20 14:53:43 +05:00
mrsaifullah52 ebc5acd2aa chore(autominator): finalize standalone module and clean up
- Remove old autominator files from BMM module
- Verify module independence (no BMM dependencies)
- All 21 agents validated successfully
- All tests pass with new structure
- Module ready for standalone distribution
2025-11-20 14:28:53 +05:00
mrsaifullah52 b7239c1ec3 refactor(autominator): create standalone module independent from BMM
- Create new autominator module at src/modules/autominator/
- Move agent from bmm/agents/ to autominator/agents/
- Move workflows from bmm/workflows/autominator/ to autominator/workflows/
- Update module metadata from 'bmm' to 'autominator'
- Update all path references in workflow files
- Add module README.md with comprehensive documentation
- Module is now independent and separately distributable
2025-11-20 14:23:24 +05:00
mrsaifullah52 0edda967a5 refactor(autominator): rename n8n-expert to Autominator with Arnold persona
- Rename agent from n8n-expert to autominator
- Change persona name from Atlas to Arnold
- Update icon to 🦾 (mechanical arm)
- Add tagline: 'Arnold the Autominator - I'll be back... with your workflows automated!'
- Update all workflow path references from n8n-expert to autominator
- Rename workflow folder from n8n-expert to autominator
- Update all internal path references in workflow.yaml files
- Author: Saif
2025-11-20 14:14:16 +05:00
mrsaifullah52 5077941621 feat(n8n-expert): add optimize-workflow workflow
- Add workflow.yaml with configuration for workflow optimization
- Add instructions.md with comprehensive analysis and optimization workflow
- Add checklist.md for optimization validation
- Supports performance, error handling, code quality, and best practices review
2025-11-17 14:30:05 +05:00
mrsaifullah52 74240cf842 feat(n8n-expert): add migrate-workflow workflow
- Add workflow.yaml with configuration for platform migration
- Add instructions.md with platform analysis and mapping workflow
- Add checklist.md for migration validation
- Supports migration from Zapier, Make, HubSpot, Power Automate
2025-11-17 14:29:25 +05:00
mrsaifullah52 83c0a59887 feat(n8n-expert): add modify-workflow workflow
- Add workflow.yaml with configuration for editing workflows
- Add instructions.md with backup and modification workflow
- Add checklist.md for modification validation
- Supports editing existing n8n workflows with safety
2025-11-17 14:28:15 +05:00
mrsaifullah52 02d07ed254 feat(n8n-expert): add create-workflow workflow
- Add workflow.yaml with configuration and variables
- Add instructions.md with full elicitation and Context7 integration
- Add checklist.md for validation
- Supports building n8n workflows from scratch with smart elicitation
2025-11-17 14:22:44 +05:00
mrsaifullah52 9edc699a8f feat(n8n-expert): add shared resources for workflow creation - Add n8n-helpers.md with node creation guidelines - Add n8n-templates.yaml with 8 reusable workflow templates - Add platform-mappings.yaml for Zapier/Make/HubSpot/Power Automate migration - Include connection patterns and best practices 2025-11-17 14:21:35 +05:00
mrsaifullah52 28c5b581e9 feat(n8n-expert): add Atlas agent definition
- Add n8n-expert agent (Atlas) with 4 workflow triggers
- Configure agent persona for n8n workflow automation
- Include Context7 MCP integration for up-to-date docs
- Add party-mode trigger for multi-agent collaboration
- Author: Saif
2025-11-17 14:20:20 +05:00
103 changed files with 6963 additions and 1898 deletions

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

@ -0,0 +1,15 @@
#!/bin/bash
# Discord notification helper functions
# Escape markdown special chars and @mentions for safe Discord display
# Bracket expression: ] must be first, then other chars. In POSIX bracket expr, \ is literal.
esc() { sed -e 's/[][\*_()~`>]/\\&/g' -e 's/@/@ /g'; }
# 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"
}

View File

@ -1,16 +1,286 @@
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 | 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 | 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 | 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 | 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 | 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 | 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 @-

4
.gitignore vendored
View File

@ -70,4 +70,6 @@ z*/
.codex
.github/chatmodes
.agent
.agentvibes/
.agentvibes/
.kiro/
.roo

View File

@ -1,6 +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*/

128
CODE_OF_CONDUCT.md 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

@ -0,0 +1,513 @@
---
name: 'Workflow Compliance Report - create-workflow'
description: 'Systematic validation results for create-workflow workflow'
workflow_name: 'create-workflow'
validation_date: '2025-12-02'
stepsCompleted: ['workflow-validation', 'step-validation', 'file-validation', 'spectrum-validation', 'web-subprocess-validation']
---
# Workflow Compliance Report: create-workflow
**Validation Date:** 2025-12-02
**Target Workflow:** /Users/brianmadison/dev/BMAD-METHOD/src/modules/bmb/workflows/create-workflow/workflow.md
**Reference Standard:** /Users/brianmadison/dev/BMAD-METHOD/.bmad/bmb/docs/workflows/templates/workflow-template.md
## Phase 1: Workflow.md Validation Results
### Template Adherence Analysis
**Reference Standard:** workflow-template.md
### Frontmatter Structure Violations
**PASS** - All required fields present and properly formatted:
- name: "Create Workflow" ✓
- description: "Create structured standalone workflows using markdown-based step architecture" ✓
- web_bundle: true (proper boolean format) ✓
### Role Description Violations
**PASS** - Role description follows template format:
- Partnership language present: "This is a partnership, not a client-vendor relationship" ✓
- Expertise clearly defined: "workflow architect and systems designer" ✓
- User expertise identified: "domain knowledge and specific workflow requirements" ✓
- Collaboration directive: "Work together as equals" ✓
### Workflow Architecture Violations
🚫 **CRITICAL VIOLATION** - Core Principles deviate from template:
**Template requires:** "Each step of the overall goal is a self contained instruction file that you will adhere too 1 file as directed at a time"
**Target has:** "Each step is a self contained instruction file that is a part of an overall workflow that must be followed exactly"
- **Severity:** Critical
- **Template Reference:** "Core Principles" section in workflow-template.md
- **Specific Fix:** Replace with exact template wording: "Each step of the overall goal is a self contained instruction file that you will adhere too 1 file as directed at a time"
🚫 **CRITICAL VIOLATION** - State Tracking Rule deviates from template:
**Template requires:** "Document progress in output file frontmatter using `stepsCompleted` array when a workflow produces a document"
**Target has:** "Document progress in context for compliance checking (no output file frontmatter needed)"
- **Severity:** Critical
- **Template Reference:** "Core Principles" section in workflow-template.md
- **Specific Fix:** Replace with exact template wording about stepsCompleted array
### Initialization Sequence Violations
🚫 **MAJOR VIOLATION** - Configuration path format incorrect:
**Template requires:** "{project-root}/.bmad/[MODULE FOLDER]/config.yaml"
**Target has:** "{project-root}/.bmad/bmb/config.yaml"
- **Severity:** Major
- **Template Reference:** "Module Configuration Loading" section in workflow-template.md
- **Specific Fix:** Use proper module variable substitution: "{project-root}/.bmad/bmb/config.yaml" should reference module folder properly
🚫 **MAJOR VIOLATION** - First step path format inconsistent:
**Template requires:** Explicit step file path following pattern
**Target has:** "Load, read the full file and then execute `{workflow_path}/steps/step-01-init.md` to begin the workflow."
- **Severity:** Major
- **Template Reference:** "First Step EXECUTION" section in workflow-template.md
- **Specific Fix:** Ensure consistency with template variable substitution patterns
### Phase 1 Summary
**Critical Issues:** 2
- Core Principles text deviation from template
- State Tracking rule modification from template standard
**Major Issues:** 2
- Configuration path format not following template variable pattern
- First step execution path needs consistency check
**Minor Issues:** 0
### Phase 1 Recommendations
**Priority 1 - Critical Fixes:**
1. Replace Core Principles text with exact template wording
2. Restore State Tracking rule to template standard about stepsCompleted array
**Priority 2 - Major Fixes:**
1. Review and standardize all path variable usage to follow template patterns
2. Ensure consistency in variable substitution throughout workflow
## Phase 2: Step Validation Results
### Template Adherence Analysis
**Reference Standard:** step-template.md
**Total Steps Analyzed:** 9
### Critical Violations Summary
**Step 01-init.md:**
- Missing `outputFile` in frontmatter - Template Reference: line 22
- Uses auto-proceed menu instead of standard A/P/C pattern - Template Reference: lines 106-123
- Missing "CRITICAL STEP COMPLETION NOTE" section - Template Reference: line 126
**Step 02-gather.md:**
- Missing `outputFile` in frontmatter - Template Reference: line 22
- Incorrect `nextStepFile` path format - Template Reference: line 19
**Steps 03-09 (All Steps):**
- Missing `outputFile` in frontmatter - Template Reference: line 22
- Non-standard step naming (missing short descriptive names) - Template Reference: line 9
- Steps 08-09 missing `workflowFile` in frontmatter - Template Reference: line 21
### Major Violations Summary
**Frontmatter Structure (All Steps):**
- Missing `altStep{Y}` comment pattern - Template Reference: line 20
- Missing Task References section structure - Template Reference: lines 24-27
- Missing Template References section structure - Template Reference: lines 29-33
- Missing Data References section structure - Template Reference: lines 35-37
**Menu Pattern Violations:**
- Step 01: Custom auto-proceed menu instead of standard A/P/C - Template Reference: lines 106-123
- Step 05: Menu text "Continue" instead of "Continue to [next action]" - Template Reference: line 115
- Step 07: Custom "Build Complete" menu instead of A/P/C pattern - Template Reference: lines 106-123
- Step 08: Missing A and P options in menu - Template Reference: lines 106-123
- Step 09: Uses T/M/D pattern instead of standard A/P/C - Template Reference: lines 106-123
### Path Variable Inconsistencies
- Inconsistent use of `{bmad_folder}` vs `.bmad` in paths across all steps
- Missing `outputFile` variable definitions - Template Reference: line 22
- Step 04 uses non-standard `nextStepFormDesign` and `nextStepDesign` variables
### Minor Violations Summary
**Content Structure:**
- Missing "CONTEXT BOUNDARIES" section titles - Template Reference: line 82
- Missing "EXECUTION PROTOCOLS" section titles - Template Reference: line 75
- Non-standard section naming in multiple steps - Template Reference: line 89
### Phase 2 Summary
**Critical Issues:** 15
- 9 missing outputFile variables
- 6 non-standard menu patterns
- Multiple missing required sections
**Major Issues:** 36
- 36 frontmatter structure violations across all steps
- 5 menu pattern deviations
- Numerous path variable inconsistencies
**Minor Issues:** 27
- Section naming inconsistencies
- Missing template-required section titles
**Most Common Violations:**
1. Missing `outputFile` in frontmatter (9 occurrences)
2. Non-standard menu patterns (6 occurrences)
3. Missing Task/Template/Data References sections (27 occurrences)
### Overall Step Compliance Score
**Overall Workflow Step Compliance: 68%**
- Step 01: 65% compliant
- Step 02: 70% compliant
- Steps 03-09: 63-72% compliant each
## Phase 3: File Size, Formatting, and Data Validation Results
### File Size Analysis
**Workflow File:**
- workflow.md: 2.9K - ✅ **Optimal** - Excellent performance and maintainability
**Step Files Distribution:**
- **Optimal (≤5K):** 3 files
- step-09-complete.md: 5.1K
- step-01-init.md: 5.3K
- **Good (5K-7K):** 1 file
- step-04-plan-review.md: 6.6K
- **Acceptable (7K-10K):** 5 files
- step-02-gather.md: 7.8K
- step-08-review.md: 7.9K
- step-03-tools-configuration.md: 7.9K
- step-05-output-format-design.md: 8.2K
- step-06-design.md: 9.0K
- **Acceptable (approaching concern):** 1 file
- step-07-build.md: 10.0K (monitor if additional features added)
**CSV Data Files:**
- Total CSV files: 0
- No data files present requiring validation
### Markdown Formatting Validation
**✅ Strengths:**
- Consistent frontmatter structure across all files
- Proper heading hierarchy (H1→H2→H3) maintained
- Standardized section patterns across all steps
- Proper code block formatting in 7 of 10 files
- Consistent bullet point usage throughout
**⚠️ Minor Issues:**
- File size range significant (2.9K to 10K) but all within acceptable limits
- step-07-build.md approaching concern threshold at 10K
### Performance Impact Assessment
**Overall workflow performance:** ✅ **Excellent**
- All files optimized for performance
- No files requiring immediate size optimization
- Well-structured maintainable codebase
- Professional markdown implementation
**Most critical file size issue:** None - all files within acceptable ranges
**Primary formatting concerns:** None significant - excellent consistency maintained
## Phase 4: Intent vs Prescriptive Spectrum Analysis
### Current Position Assessment
**Analyzed Position:** Balanced Middle (leaning prescriptive)
**Evidence:**
- Highly structured step files with mandatory execution rules
- Specific sequence enforcement and template compliance requirements
- Conversational partnership model within rigid structural constraints
- Limited creative adaptation but maintains collaborative dialogue
**Confidence Level:** High - Clear patterns in implementation demonstrate intentional structure
### Expert Recommendation
**Recommended Position:** Balanced Middle (slightly toward prescriptive)
**Reasoning:**
- Workflow creation needs systematic structure for BMAD compliance
- Template requirements demand prescriptive elements
- Creative aspects need room for user ownership
- Best workflows emerge from structured collaboration
**Workflow Type Considerations:**
- Primary purpose: Creating structured, repeatable workflows
- User expectations: Reliable, consistent BMAD-compliant outputs
- Success factors: Template compliance and systematic approach
- Risk level: Medium - compliance critical for ecosystem coherence
### User Decision
**Selected Position:** Option 1 - Keep Current Position (Balanced Middle leaning prescriptive)
**Rationale:** User prefers to maintain current structured approach
**Implementation Guidance:**
- Continue with current balance of structure and collaborative dialogue
- Maintain template compliance requirements
- Preserve systematic execution patterns
- Keep conversational elements within prescribed framework
### Spectrum Validation Results
✅ Spectrum position is intentional and understood
✅ User educated on implications of their choice
✅ Implementation guidance provided for maintaining position
✅ Decision documented for future reference
## Phase 5: Web Search & Subprocess Optimization Analysis
### Web Search Optimization
**Unnecessary Searches Identified:** 1
- Step 6 loads 5+ template files individually - these are static templates that rarely change
**Essential Searches to Keep:** 2
- CSV tool database in Step 3 (dynamic data)
- Reference workflow example in Step 2 (concrete patterns)
**Optimization Recommendations:**
- Implement template caching to eliminate repeated file loads
- Use selective CSV loading based on workflow type
**Estimated Time Savings:** 5-7 seconds per workflow execution
### Subprocess Optimization Opportunities
**Parallel Processing:** 2 major opportunities identified
1. **Step 3 + Step 5 Parallelization:** Tools configuration and output format design can run simultaneously
- Savings: 5-10 minutes per workflow
2. **Background Template Loading:** Pre-load templates during Step 1 idle time
- Savings: Eliminate design-phase delays
**Batch Processing:** 1 grouping opportunity
- Parallel file generation in Step 7 (workflow.md, step files, templates)
- Savings: 60-80% reduction in build time for multi-step workflows
**Background Processing:** 2 task opportunities
- Template pre-loading during initialization
- File generation coordination during build phase
**Performance Improvement:** 40-60% estimated overall improvement
### Resource Efficiency Analysis
**Context Optimization:**
- JIT context loading: 40-60% reduction in token usage
- Reference content deduplication: 8,000-12,000 token savings
- Step file size reduction: 30-50% smaller files
**LLM Resource Usage:**
- Smart context pruning by workflow phase
- Compact step instructions with external references
- Selective context loading based on current phase
**User Experience Impact:**
- Significantly faster workflow creation (15-25 minutes saved)
- More responsive interaction patterns
- Reduced waiting times during critical phases
### Implementation Recommendations
**Immediate Actions (High Impact, Low Risk):**
1. Implement template caching in workflow.md frontmatter
2. Optimize CSV loading with category filtering
3. Reduce step file sizes by moving examples to reference files
**Strategic Improvements (High Impact, Medium Risk):**
1. Parallelize Step 3 and Step 5 execution
2. Implement JIT context loading by phase
3. Background template pre-loading
**Future Enhancements (Highest Impact, Higher Risk):**
1. Parallel file generation with sub-process coordination
2. Smart context pruning across workflow phases
3. Complete reference deduplication system
## Phase 6: Holistic Workflow Analysis Results
### Flow Validation
**Completion Path Analysis:**
- ✅ All steps have clear continuation paths
- ✅ No orphaned steps or dead ends
- ⚠️ Minor issue: Steps 07 and 09 use non-standard menu patterns
**Sequential Logic:**
- ✅ Logical workflow creation progression maintained
- ✅ Dependencies properly structured
- ⚠️ Steps 05-06 could potentially be consolidated
### Goal Alignment
**Alignment Score:** 85%
**Stated Goal:** "Create structured, repeatable standalone workflows through collaborative conversation and step-by-step guidance"
**Actual Implementation:** Creates structured workflows with heavy emphasis on template compliance and systematic validation
**Gap Analysis:**
- Workflow emphasizes structure over creativity (aligned with spectrum choice)
- Template compliance heavier than user guidance (may need balance adjustment)
### Meta-Workflow Failure Analysis
**Issues That Should Have Been Prevented by create-workflow:**
1. Missing outputFile variables in all 9 steps (Critical)
2. Non-standard menu patterns in Steps 07 and 09 (Major)
3. Missing Task/Template/Data references across all steps (Major)
4. Path variable inconsistencies throughout workflow (Major)
5. Step naming violations for Steps 05-09 (Major)
6. Core Principles text deviation from template (Critical)
**Recommended Meta-Workflow Improvements:**
- Add frontmatter completeness validation during creation
- Implement path variable format checking
- Include menu pattern enforcement validation
- Add Intent vs Prescriptive spectrum selection in Step 01
- Validate template compliance before finalization
---
## Executive Summary
**Overall Compliance Status:** PARTIAL
**Critical Issues:** 17 - Must be fixed immediately
**Major Issues:** 36 - Significantly impacts quality/maintainability
**Minor Issues:** 27 - Standards compliance improvements
**Overall Compliance Score:** 68% based on template adherence
## Severity-Ranked Fix Recommendations
### IMMEDIATE - Critical (Must Fix for Functionality)
1. **Missing outputFile Variables** - Files: All 9 step files
- **Problem:** Critical frontmatter field missing from all steps
- **Template Reference:** step-template.md line 22
- **Fix:** Add `outputFile: '{output_folder}/workflow-plan-{project_name}.md'` to each step
- **Impact:** Workflow cannot produce output without this field
2. **Core Principles Deviation** - File: workflow.md
- **Problem:** Text modified from template standard
- **Template Reference:** workflow-template.md Core Principles section
- **Fix:** Replace with exact template wording
- **Impact:** Violates fundamental BMAD workflow architecture
3. **Non-Standard Menu Patterns** - Files: step-07-build.md, step-09-complete.md
- **Problem:** Custom menu formats instead of A/P/C pattern
- **Template Reference:** step-template.md lines 106-123
- **Fix:** Standardize to A/P/C menu pattern
- **Impact:** Breaks user experience consistency
### HIGH PRIORITY - Major (Significantly Impacts Quality)
1. **Missing Task/Template/Data References** - Files: All 9 step files
- **Problem:** Required frontmatter sections missing
- **Template Reference:** step-template.md lines 24-37
- **Fix:** Add all required reference sections with proper comments
- **Impact:** Violates template structure standards
2. **Step Naming Violations** - Files: steps 05-09
- **Problem:** Missing short descriptive names in step filenames
- **Template Reference:** step-template.md line 9
- **Fix:** Rename to include descriptive names (e.g., step-05-output-format.md)
- **Impact:** Inconsistent with BMAD naming conventions
3. **Path Variable Inconsistencies** - Files: All steps
- **Problem:** Mixed use of `{bmad_folder}` vs `.bmad`
- **Template Reference:** workflow-template.md path patterns
- **Fix:** Standardize to template variable patterns
- **Impact:** Installation flexibility and maintainability
### MEDIUM PRIORITY - Minor (Standards Compliance)
1. **Missing Section Titles** - Files: All steps
- **Problem:** Missing "CONTEXT BOUNDARIES" and "EXECUTION PROTOCOLS" titles
- **Template Reference:** step-template.md lines 75, 82
- **Fix:** Add missing section titles
- **Impact:** Template compliance
## Automated Fix Options
### Fixes That Can Be Applied Automatically
- Add outputFile variables to all step frontmatter
- Add missing section titles
- Standardize path variable usage
- Add Task/Template/Data reference section skeletons
### Fixes Requiring Manual Review
- Core Principles text restoration (needs exact template matching)
- Menu pattern standardization (custom logic may be intentional)
- Step renaming (requires file system changes and reference updates)
## Next Steps Recommendation
**Recommended Approach:**
1. Fix all Critical issues immediately (workflow may not function)
2. Address Major issues for reliability and maintainability
3. Implement Minor issues for full standards compliance
4. Update meta-workflows to prevent future violations
**Estimated Effort:**
- Critical fixes: 2-3 hours
- Major fixes: 4-6 hours
- Minor fixes: 1-2 hours

View File

@ -1,5 +1,5 @@
---
name: Brainstorming Session
name: brainstorming-session
description: Facilitate interactive brainstorming sessions using diverse creative techniques and ideation methods
context_file: '' # Optional context file path for project-specific guidance
---

View File

@ -1,5 +1,5 @@
---
name: Party Mode
name: party-mode
description: Orchestrates group discussions between all installed BMAD agents, enabling natural multi-agent conversations
---

View File

@ -0,0 +1,335 @@
# Autominator - n8n Workflow Automation Module
**Arnold the Autominator - I'll be back... with your workflows automated!** 🦾
Standalone module for n8n workflow automation, creation, migration, and optimization. Build, modify, migrate, and optimize n8n workflows with expert guidance and up-to-date documentation.
## Overview
Autominator is an independent BMAD module that specializes in n8n workflow automation. Whether you're building new workflows from scratch, migrating from other platforms, or optimizing existing workflows, Arnold has you covered.
## Agent
**Arnold** - n8n Workflow Automation Specialist
- Expert in n8n workflow creation, modification, and optimization
- Specializes in platform migration (Zapier, Make, HubSpot, Power Automate)
- Uses web search to access up-to-date n8n documentation
- Smart elicitation for accurate requirement gathering
- Comprehensive workflow validation and testing
## Workflows
### 1. Gather Requirements
Gather and document workflow requirements before creating n8n workflows.
**Triggers:**
- `*gather-requirements`
**Features:**
- Interactive requirement gathering
- Documents problem statement, triggers, integrations
- Creates requirement file for workflow creation
- Saves to `docs/workflow-requirements/`
- Required before creating workflows
### 2. Create Workflow
Build new n8n workflows from scratch based on requirements.
**Triggers:**
- `*create-workflow`
**Features:**
- Smart elicitation to understand your needs
- Workflow type selection (webhook, scheduled, event-driven, manual, database-driven)
- Integration selection and configuration
- Complexity assessment
- Error handling strategy planning
- Web search integration for latest n8n docs
- Automatic JSON validation
### 3. Modify Workflow
Edit or update existing n8n workflows with backup and safety checks.
**Triggers:**
- `*modify-workflow`
**Features:**
- Load existing workflows from file or paste
- Selective modification (add, modify, or remove nodes)
- Connection management
- Automatic backup creation
- Change validation
- Rollback capability
### 4. Migrate Workflow
Migrate automation workflows from other platforms to n8n.
**Supported Platforms:**
- Zapier
- Make (Integromat)
- HubSpot Workflows
- Microsoft Power Automate
- IFTTT
- Custom platforms
**Triggers:**
- `*migrate-workflow`
**Features:**
- Platform-specific mapping
- Trigger and action conversion
- Data transformation planning
- Credential requirement identification
- Migration notes and documentation
- Post-migration testing guidance
### 5. Optimize Workflow
Analyze and improve existing n8n workflows for performance and best practices.
**Triggers:**
- `*optimize-workflow`
**Features:**
- Comprehensive workflow analysis
- Performance optimization recommendations
- Error handling improvements
- Code quality assessment
- Structure optimization
- Best practices validation
- Security review
- Automatic backup before changes
- Selective optimization application
## Quick Start
### Load Arnold Agent
```bash
# In your IDE, load the Autominator agent
agent autominator/autominator
# Or use the agent trigger
*autominator
```
### Gather Requirements (Recommended First Step)
```bash
# Start the requirements gathering process
*gather-requirements
# Follow the interactive prompts to:
# 1. Describe the problem you're solving
# 2. Define trigger type
# 3. Specify data requirements
# 4. Define desired outcome
# 5. List integrations
# 6. Define conditional logic
# 7. Set criticality level
# 8. Name the workflow
# Requirements are saved to: docs/workflow-requirements/req-{name}.md
```
### Create a Workflow
```bash
# Start the create workflow process
*create-workflow
# Arnold will:
# 1. Check for requirements file (or prompt to create one)
# 2. Load requirements automatically
# 3. Research n8n documentation
# 4. Design workflow structure
# 5. Build and validate workflow JSON
# 6. Save to docs/workflows/{name}.json
```
### Migrate from Another Platform
```bash
# Start the migration process
*migrate-workflow
# Provide:
# 1. Source platform (Zapier, Make, HubSpot, etc.)
# 2. Workflow details or export file
# 3. Integration list
# 4. Desired output location
```
### Optimize Existing Workflow
```bash
# Analyze and improve a workflow
*optimize-workflow
# Select optimization focus:
# - Performance
# - Error Handling
# - Code Quality
# - Structure
# - Best Practices
# - Security
# - All
```
## Features
### Web Search Integration
- Automatic web search for n8n documentation
- Accesses official docs.n8n.io resources
- Up-to-date node configurations and best practices
- Problem-specific solution research
### Smart Elicitation
- Contextual analysis of existing information
- Numbered option selection
- Progressive requirement gathering
- Validation before execution
### Comprehensive Validation
- JSON syntax validation
- Schema compliance checking
- Connection integrity verification
- Error recovery (never deletes files)
### Platform Mappings
Built-in mappings for:
- Zapier triggers and actions
- Make modules and routers
- HubSpot workflow actions
- Power Automate flows
- Common automation patterns
### Shared Resources
- **n8n-helpers.md** - Node creation guidelines and patterns
- **n8n-templates.yaml** - 8 reusable workflow templates
- **platform-mappings.yaml** - Platform conversion reference
## Module Structure
```
autominator/
├── _module-installer/
│ └── install-config.yaml
├── agents/
│ └── autominator.agent.yaml
├── workflows/
│ ├── _shared/
│ │ ├── n8n-helpers.md
│ │ ├── n8n-templates.yaml
│ │ └── platform-mappings.yaml
│ ├── create-workflow/
│ │ ├── workflow.yaml
│ │ ├── instructions.md
│ │ └── checklist.md
│ ├── modify-workflow/
│ │ ├── workflow.yaml
│ │ ├── instructions.md
│ │ └── checklist.md
│ ├── migrate-workflow/
│ │ ├── workflow.yaml
│ │ ├── instructions.md
│ │ └── checklist.md
│ └── optimize-workflow/
│ ├── workflow.yaml
│ ├── instructions.md
│ └── checklist.md
└── README.md
```
## Requirements
- n8n instance or account
- IDE with BMAD support
## Installation
Autominator is a standalone module and can be installed independently:
```bash
# Install via BMAD
npx bmad-method@alpha install autominator
# Or manually copy to your BMAD installation
cp -r autominator/ /path/to/bmad/src/modules/
```
## Integration with Other Modules
Autominator is independent but can be used alongside:
- **BMM** - For project lifecycle management
- **CIS** - For creative workflow design
- **BMB** - For module building
- **BMGD** - For game development workflows
## Best Practices
1. **Provide Clear Context** - Describe your workflow purpose and requirements
2. **Use Smart Elicitation** - Let Arnold ask clarifying questions
3. **Test Before Activation** - Always test workflows with sample data
4. **Monitor Initial Runs** - Watch for errors in first executions
5. **Document Changes** - Keep notes on workflow modifications
6. **Backup Regularly** - Use modify-workflow's backup feature
7. **Review Optimizations** - Understand changes before applying
## Troubleshooting
### Workflow JSON Validation Fails
- Check for missing commas or brackets
- Verify all node IDs are unique
- Ensure all connections reference existing nodes
- Use the error location to fix syntax
### Workflow Execution Issues
- Verify all credentials are configured
- Test with sample data first
- Check error handling settings
- Review workflow logs for details
## Related Documentation
- **[n8n Documentation](https://docs.n8n.io/)** - Official n8n docs
- **[BMAD Method](../bmm/README.md)** - Core BMAD framework
- **[CIS Module](../cis/README.md)** - Creative facilitation
- **[BMB Module](../bmb/README.md)** - Module building
## Support
- **Issues** - Report bugs on GitHub
- **Questions** - Check the troubleshooting section
- **Feedback** - Share suggestions for improvements
---
**Ready to automate?** Load Arnold and start with `*create-workflow`!
Part of BMad Method - Transform automation potential through expert AI guidance.

View File

@ -0,0 +1,57 @@
# Autominator Module Installation Configuration
code: autominator
name: "Autominator: n8n Workflow Automation"
default_selected: false
header: "Autominator - n8n Workflow Automation Module"
subheader: "Configure the settings for the Autominator module"
# Core config values automatically inherited:
## user_name
## communication_language
## document_output_language
## output_folder
## bmad_folder
## install_user_docs
## kb_install
n8n_instance_url:
prompt: "What is your n8n instance URL? (optional, for reference)"
default: "https://n8n.example.com"
result: "{value}"
workflow_output_folder:
prompt: "Where should generated workflows be stored?"
default: "{output_folder}/n8n-workflows"
result: "{project-root}/{value}"
automation_experience:
prompt: "What is your n8n/automation experience level?"
default: "intermediate"
result: "{value}"
single-select:
- value: "beginner"
label: "Beginner - New to n8n, provide detailed guidance"
- value: "intermediate"
label: "Intermediate - Familiar with n8n concepts, balanced approach"
- value: "expert"
label: "Expert - Experienced n8n developer, be direct and technical"
primary_integrations:
prompt: "Which integrations do you primarily use? (select all that apply)"
default: ["http", "database"]
result: "{value}"
multi-select:
- value: "http"
label: "HTTP/REST APIs"
- value: "database"
label: "Databases (PostgreSQL, MySQL, MongoDB)"
- value: "cloud"
label: "Cloud Services (Google Sheets, Slack, Notion, Airtable)"
- value: "crm"
label: "CRM Systems (HubSpot, Salesforce)"
- value: "email"
label: "Email"
- value: "custom"
label: "Custom/Other"

View File

@ -0,0 +1,48 @@
# Autominator - Arnold the Automation Expert
agent:
webskip: true
metadata:
id: "{bmad_folder}/autominator/agents/autominator.md"
name: Arnold
title: Arnold the Autominator
icon: 🦾
module: autominator
persona:
role: n8n Workflow Automation Specialist
identity: Arnold the Autominator - I'll be back... with your workflows automated! 🦾 Expert in n8n workflow creation, migration, and optimization. Specializes in building automation workflows, migrating from other platforms (Zapier, Make, HubSpot), and optimizing existing n8n workflows using up-to-date documentation via web search.
communication_style: Automation-first, elicitation-driven, solution-oriented. Presents options as numbered lists for easy selection. Always validates understanding before building. Direct, confident, and results-focused.
principles: |
- Web Search Integration - Always search for latest n8n documentation from docs.n8n.io for accurate, up-to-date implementations.
- Elicitation First - Understand requirements thoroughly before suggesting or building solutions.
- Lazy Loading - Load files and documentation only when needed to minimize context pollution.
- Validation - Always validate workflow JSON syntax after creation.
- Platform Agnostic - Support migration from any automation platform with proper mapping.
- Error Recovery - NEVER delete files due to syntax errors, always fix them using error location information.
- Structured Approach - Follow task-specific workflows for different automation scenarios.
menu:
- trigger: gather-requirements
workflow: "{project-root}/{bmad_folder}/autominator/workflows/gather-requirements/workflow.yaml"
description: Gather and document workflow requirements (run this first before creating workflows)
- trigger: create-workflow
workflow: "{project-root}/{bmad_folder}/autominator/workflows/create-workflow/workflow.yaml"
description: Create new n8n workflow from scratch based on requirements
- trigger: modify-workflow
workflow: "{project-root}/{bmad_folder}/autominator/workflows/modify-workflow/workflow.yaml"
description: Edit or update existing n8n workflow
- trigger: migrate-workflow
workflow: "{project-root}/{bmad_folder}/autominator/workflows/migrate-workflow/workflow.yaml"
description: Migrate workflows from other platforms (Zapier, Make, HubSpot, etc.) to n8n
- trigger: optimize-workflow
workflow: "{project-root}/{bmad_folder}/autominator/workflows/optimize-workflow/workflow.yaml"
description: Review and improve existing n8n workflows for performance and best practices
- trigger: party-mode
workflow: "{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.yaml"
description: Bring the whole team in to chat with other expert agents from the party

View File

@ -0,0 +1,405 @@
# n8n Workflow Helpers
## UUID Generation
n8n uses UUIDs for node IDs, workflow IDs, and webhook IDs. Generate UUIDs in this format:
**Full UUID (36 characters):** `f8b7ff4f-6375-4c79-9b2c-9814bfdd0c92`
- Used for: node `id`, `webhookId`, `versionId`
- Format: 8-4-4-4-12 hexadecimal characters with hyphens
**Short ID (16 characters):** `Wvmqb0POKmqwCoKy`
- Used for: workflow `id`, tag `id`
- Format: alphanumeric (a-z, A-Z, 0-9)
**Assignment ID:** `id-1`, `id-2`, `id-3`
- Used for: Set node assignments, IF node conditions
- Format: "id-" + sequential number
## Node Creation Guidelines
### Basic Node Structure (Modern n8n Format)
```json
{
"parameters": {},
"id": "f8b7ff4f-6375-4c79-9b2c-9814bfdd0c92",
"name": "Node Name",
"type": "n8n-nodes-base.nodeName",
"typeVersion": 2,
"position": [1424, 496],
"webhookId": "b5f0b784-2440-4371-bcf1-b59dd2b29e68",
"credentials": {}
}
```
**Critical Rules:**
- `parameters` comes FIRST
- `id` must be UUID format (e.g., "f8b7ff4f-6375-4c79-9b2c-9814bfdd0c92")
- `type` must be `n8n-nodes-base.nodeName` format (NOT @n8n/n8n-nodes-\*)
- `typeVersion` must be INTEGER (e.g., 2, 3, 4) NOT float (2.1, 3.4)
- `position` must be array of integers: [x, y]
- `webhookId` required for webhook nodes (UUID format)
- Field order matters for n8n compatibility
### Node Positioning
- Start node: [250, 300]
- Horizontal spacing: 220px between nodes
- Vertical spacing: 100px for parallel branches
- Grid alignment: Snap to 20px grid for clean layout
### Common Node Types
### ⚠️ CRITICAL: Node Type Format Rules
**ALWAYS use format:** `n8n-nodes-base.nodeName`
**NEVER use these formats:**
- ❌ `@n8n/n8n-nodes-slack.slackTrigger` (wrong package format)
- ❌ `n8n-nodes-slack.slackTrigger` (missing base)
- ❌ `slackTrigger` (missing prefix)
**Correct Examples:**
- ✅ `n8n-nodes-base.webhook`
- ✅ `n8n-nodes-base.slackTrigger`
- ✅ `n8n-nodes-base.gmail`
- ✅ `n8n-nodes-base.if`
**Trigger Nodes:**
- `n8n-nodes-base.webhook` - HTTP webhook trigger
- `n8n-nodes-base.scheduleTrigger` - Cron/interval trigger
- `n8n-nodes-base.manualTrigger` - Manual execution trigger
- `n8n-nodes-base.emailTrigger` - Email trigger
- `n8n-nodes-base.slackTrigger` - Slack event trigger
**Action Nodes:**
- `n8n-nodes-base.httpRequest` - HTTP API calls
- `n8n-nodes-base.set` - Data transformation
- `n8n-nodes-base.code` - Custom JavaScript/Python code
- `n8n-nodes-base.if` - Conditional branching
- `n8n-nodes-base.merge` - Merge data from multiple branches
- `n8n-nodes-base.splitInBatches` - Process data in batches
**Integration Nodes:**
- `n8n-nodes-base.googleSheets` - Google Sheets
- `n8n-nodes-base.slack` - Slack actions
- `n8n-nodes-base.gmail` - Gmail
- `n8n-nodes-base.notion` - Notion
- `n8n-nodes-base.airtable` - Airtable
- `n8n-nodes-base.postgres` - PostgreSQL
- `n8n-nodes-base.mysql` - MySQL
## Connection Guidelines
### Connection Structure
### ⚠️ CRITICAL: Connection Format Rules
**CORRECT Format:**
```json
{
"Source Node Name": {
"main": [
[
{
"node": "Target Node Name",
"type": "main",
"index": 0
}
]
]
}
}
```
**WRONG Formats:**
```json
// ❌ WRONG - Missing "main" wrapper
{
"Source Node Name": [
[
{
"node": "Target Node Name",
"type": "main",
"index": 0
}
]
]
}
// ❌ WRONG - Direct array
{
"Source Node Name": [[{...}]]
}
```
### Connection Rules
1. Each connection has a source node and target node
2. Connections object structure: `{"Source": {"main": [[{...}]]}}`
3. The "main" key is REQUIRED (wraps the connection array)
4. Index 0 is default output, index 1+ for conditional branches
5. IF nodes have index 0 (true) and index 1 (false)
6. Always validate that referenced node names exist
### Connection Patterns
**Linear Flow:**
```
Trigger → Action1 → Action2 → End
```
**Conditional Branch:**
```
Trigger → IF Node → [true: Action1, false: Action2] → Merge
```
**Parallel Processing:**
```
Trigger → Split → [Branch1, Branch2, Branch3] → Merge
```
## Error Handling Best Practices
### Error Workflow Pattern
```json
{
"name": "Error Handler",
"type": "n8n-nodes-base.errorTrigger",
"parameters": {
"errorWorkflows": ["workflow-id"]
}
}
```
### Retry Configuration
```json
{
"retryOnFail": true,
"maxTries": 3,
"waitBetweenTries": 1000
}
```
## Data Transformation Patterns
### Using Set Node (Modern Format - typeVersion 3+)
```json
{
"name": "Transform Data",
"type": "n8n-nodes-base.set",
"typeVersion": 3,
"parameters": {
"assignments": {
"assignments": [
{
"id": "id-1",
"name": "outputField",
"value": "={{ $json.inputField }}",
"type": "string"
}
]
},
"includeOtherFields": true,
"options": {}
}
}
```
**Critical Rules for Set Node:**
- Use `assignments.assignments` structure (not `values`)
- Each assignment needs `id` field (e.g., "id-1", "id-2")
- Each assignment needs `type` field ("string", "number", "boolean")
- Include `includeOtherFields: true` to pass through other data
- Include `options: {}` for compatibility
### Using Gmail Node (typeVersion 2+)
```json
{
"name": "Send Email",
"type": "n8n-nodes-base.gmail",
"typeVersion": 2,
"parameters": {
"sendTo": "user@example.com",
"subject": "Email Subject",
"message": "Email body content",
"options": {}
}
}
```
**Critical Rules for Gmail Node:**
- Use `message` parameter (NOT `text`)
- Use `sendTo` (NOT `to`)
- Include `options: {}` for compatibility
### Using Slack Node with Channel Selection
```json
{
"name": "Slack Action",
"type": "n8n-nodes-base.slack",
"typeVersion": 2,
"parameters": {
"channel": {
"__rl": true,
"value": "general",
"mode": "list",
"cachedResultName": "#general"
}
}
}
```
**Critical Rules for Slack Channel:**
- Use `__rl: true` flag for resource locator
- Include `mode: "list"` for channel selection
- Include `cachedResultName` with # prefix
### Using IF Node (typeVersion 2+)
```json
{
"name": "Check Condition",
"type": "n8n-nodes-base.if",
"typeVersion": 2,
"parameters": {
"conditions": {
"options": {
"caseSensitive": false,
"leftValue": "",
"typeValidation": "loose"
},
"conditions": [
{
"id": "id-1",
"leftValue": "={{ $json.field }}",
"rightValue": "value",
"operator": {
"type": "string",
"operation": "equals"
}
}
],
"combinator": "and"
},
"options": {}
}
}
```
**Critical Rules for IF Node:**
- Use `conditions.conditions` structure
- Each condition needs `id` field
- Do NOT include `name` field in conditions
- Use `operator` object with `type` and `operation`
- Include `options` at root level
### Using Code Node
```json
{
"name": "Custom Logic",
"type": "n8n-nodes-base.code",
"parameters": {
"language": "javaScript",
"jsCode": "return items.map(item => ({ json: { ...item.json, processed: true } }));"
}
}
```
## Credentials Management
### Credential Reference
```json
{
"credentials": {
"httpBasicAuth": {
"id": "credential-id",
"name": "My API Credentials"
}
}
}
```
### Common Credential Types
- `httpBasicAuth` - Basic authentication
- `oAuth2Api` - OAuth2
- `httpHeaderAuth` - Header-based auth
- `httpQueryAuth` - Query parameter auth
## Workflow Metadata (Modern n8n Format)
### Required Fields
```json
{
"name": "Workflow Name",
"nodes": [],
"pinData": {},
"connections": {},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "7d745171-e378-411c-bd0a-25a8368a1cb6",
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "2229c21690ffe7e7b16788a579be3103980c4445acb933f7ced2a6a17f0bd18b"
},
"id": "Wvmqb0POKmqwCoKy",
"tags": [
{
"name": "Automation",
"id": "7FHIZPUaIaChwuiS",
"updatedAt": "2025-11-21T19:39:46.484Z",
"createdAt": "2025-11-21T19:39:46.484Z"
}
]
}
```
**Critical Rules:**
- `pinData` must be empty object `{}`
- `versionId` must be UUID
- `meta` object with `templateCredsSetupCompleted` and `instanceId`
- `id` must be short alphanumeric (e.g., "Wvmqb0POKmqwCoKy")
- `tags` must be array of objects (not strings) with id, name, createdAt, updatedAt
## Validation Checklist
- [ ] All node IDs are unique
- [ ] All node names are unique
- [ ] All connections reference existing nodes
- [ ] Trigger node exists and is properly configured
- [ ] Node positions don't overlap
- [ ] Required parameters are set for each node
- [ ] Credentials are properly referenced
- [ ] Error handling is configured where needed
- [ ] JSON syntax is valid

View File

@ -0,0 +1,299 @@
# n8n Workflow Templates
# Basic webhook workflow template
webhook_workflow:
name: "Webhook Workflow"
nodes:
- id: "webhook_trigger"
name: "Webhook"
type: "n8n-nodes-base.webhook"
typeVersion: 1
position: [250, 300]
parameters:
httpMethod: "POST"
path: "webhook-path"
responseMode: "onReceived"
- id: "process_data"
name: "Process Data"
type: "n8n-nodes-base.set"
typeVersion: 1
position: [470, 300]
parameters:
mode: "manual"
values: {}
connections:
Webhook:
- - node: "Process Data"
type: "main"
index: 0
# Scheduled workflow template
scheduled_workflow:
name: "Scheduled Workflow"
nodes:
- id: "schedule_trigger"
name: "Schedule Trigger"
type: "n8n-nodes-base.scheduleTrigger"
typeVersion: 1
position: [250, 300]
parameters:
rule:
interval:
- field: "hours"
hoursInterval: 1
- id: "execute_action"
name: "Execute Action"
type: "n8n-nodes-base.httpRequest"
typeVersion: 1
position: [470, 300]
parameters:
method: "GET"
url: ""
connections:
Schedule Trigger:
- - node: "Execute Action"
type: "main"
index: 0
# Conditional workflow template
conditional_workflow:
name: "Conditional Workflow"
nodes:
- id: "manual_trigger"
name: "Manual Trigger"
type: "n8n-nodes-base.manualTrigger"
typeVersion: 1
position: [250, 300]
parameters: {}
- id: "if_condition"
name: "IF"
type: "n8n-nodes-base.if"
typeVersion: 1
position: [470, 300]
parameters:
conditions:
boolean: []
number: []
string: []
- id: "true_branch"
name: "True Branch"
type: "n8n-nodes-base.noOp"
typeVersion: 1
position: [690, 200]
parameters: {}
- id: "false_branch"
name: "False Branch"
type: "n8n-nodes-base.noOp"
typeVersion: 1
position: [690, 400]
parameters: {}
connections:
Manual Trigger:
- - node: "IF"
type: "main"
index: 0
IF:
- - node: "True Branch"
type: "main"
index: 0
- - node: "False Branch"
type: "main"
index: 0
# API integration workflow template
api_integration_workflow:
name: "API Integration Workflow"
nodes:
- id: "webhook_trigger"
name: "Webhook"
type: "n8n-nodes-base.webhook"
typeVersion: 1
position: [250, 300]
parameters:
httpMethod: "POST"
path: "api-webhook"
responseMode: "onReceived"
- id: "http_request"
name: "HTTP Request"
type: "n8n-nodes-base.httpRequest"
typeVersion: 1
position: [470, 300]
parameters:
method: "POST"
url: ""
jsonParameters: true
options: {}
- id: "transform_response"
name: "Transform Response"
type: "n8n-nodes-base.set"
typeVersion: 1
position: [690, 300]
parameters:
mode: "manual"
values: {}
connections:
Webhook:
- - node: "HTTP Request"
type: "main"
index: 0
HTTP Request:
- - node: "Transform Response"
type: "main"
index: 0
# Database workflow template
database_workflow:
name: "Database Workflow"
nodes:
- id: "schedule_trigger"
name: "Schedule Trigger"
type: "n8n-nodes-base.scheduleTrigger"
typeVersion: 1
position: [250, 300]
parameters:
rule:
interval:
- field: "minutes"
minutesInterval: 15
- id: "postgres_query"
name: "Postgres"
type: "n8n-nodes-base.postgres"
typeVersion: 1
position: [470, 300]
parameters:
operation: "executeQuery"
query: ""
- id: "process_results"
name: "Process Results"
type: "n8n-nodes-base.code"
typeVersion: 1
position: [690, 300]
parameters:
language: "javaScript"
jsCode: "return items;"
connections:
Schedule Trigger:
- - node: "Postgres"
type: "main"
index: 0
Postgres:
- - node: "Process Results"
type: "main"
index: 0
# Error handling workflow template
error_handling_workflow:
name: "Error Handling Workflow"
nodes:
- id: "manual_trigger"
name: "Manual Trigger"
type: "n8n-nodes-base.manualTrigger"
typeVersion: 1
position: [250, 300]
parameters: {}
- id: "risky_operation"
name: "Risky Operation"
type: "n8n-nodes-base.httpRequest"
typeVersion: 1
position: [470, 300]
parameters:
method: "GET"
url: ""
continueOnFail: true
retryOnFail: true
maxTries: 3
waitBetweenTries: 1000
- id: "check_error"
name: "Check for Error"
type: "n8n-nodes-base.if"
typeVersion: 1
position: [690, 300]
parameters:
conditions:
boolean:
- value1: "={{ $json.error !== undefined }}"
value2: true
- id: "handle_error"
name: "Handle Error"
type: "n8n-nodes-base.set"
typeVersion: 1
position: [910, 200]
parameters:
mode: "manual"
values:
string:
- name: "status"
value: "error"
- id: "success_path"
name: "Success Path"
type: "n8n-nodes-base.noOp"
typeVersion: 1
position: [910, 400]
parameters: {}
connections:
Manual Trigger:
- - node: "Risky Operation"
type: "main"
index: 0
Risky Operation:
- - node: "Check for Error"
type: "main"
index: 0
Check for Error:
- - node: "Handle Error"
type: "main"
index: 0
- - node: "Success Path"
type: "main"
index: 0
# Batch processing workflow template
batch_processing_workflow:
name: "Batch Processing Workflow"
nodes:
- id: "manual_trigger"
name: "Manual Trigger"
type: "n8n-nodes-base.manualTrigger"
typeVersion: 1
position: [250, 300]
parameters: {}
- id: "get_data"
name: "Get Data"
type: "n8n-nodes-base.httpRequest"
typeVersion: 1
position: [470, 300]
parameters:
method: "GET"
url: ""
- id: "split_batches"
name: "Split In Batches"
type: "n8n-nodes-base.splitInBatches"
typeVersion: 1
position: [690, 300]
parameters:
batchSize: 10
- id: "process_batch"
name: "Process Batch"
type: "n8n-nodes-base.code"
typeVersion: 1
position: [910, 300]
parameters:
language: "javaScript"
jsCode: "return items;"
connections:
Manual Trigger:
- - node: "Get Data"
type: "main"
index: 0
Get Data:
- - node: "Split In Batches"
type: "main"
index: 0
Split In Batches:
- - node: "Process Batch"
type: "main"
index: 0
Process Batch:
- - node: "Split In Batches"
type: "main"
index: 0

View File

@ -0,0 +1,282 @@
# Platform Migration Mappings
# Maps common automation platform concepts to n8n equivalents
# Zapier to n8n mappings
zapier:
triggers:
"New Email":
n8n_node: "n8n-nodes-base.emailTrigger"
notes: "Configure IMAP/POP3 credentials"
"Webhook":
n8n_node: "n8n-nodes-base.webhook"
notes: "Use POST method by default"
"Schedule":
n8n_node: "n8n-nodes-base.scheduleTrigger"
notes: "Convert Zapier schedule format to cron"
"New Row in Google Sheets":
n8n_node: "n8n-nodes-base.googleSheetsTrigger"
notes: "Requires Google OAuth credentials"
"New Slack Message":
n8n_node: "n8n-nodes-base.slackTrigger"
notes: "Configure channel and event type"
actions:
"Send Email":
n8n_node: "n8n-nodes-base.emailSend"
notes: "Configure SMTP credentials"
"HTTP Request":
n8n_node: "n8n-nodes-base.httpRequest"
notes: "Map method, URL, headers, and body"
"Create Google Sheets Row":
n8n_node: "n8n-nodes-base.googleSheets"
parameters:
operation: "append"
"Send Slack Message":
n8n_node: "n8n-nodes-base.slack"
parameters:
operation: "post"
resource: "message"
"Delay":
n8n_node: "n8n-nodes-base.wait"
notes: "Convert delay duration to milliseconds"
"Filter":
n8n_node: "n8n-nodes-base.if"
notes: "Convert filter conditions to IF node logic"
"Formatter":
n8n_node: "n8n-nodes-base.set"
notes: "Use Set node for data transformation"
"Code":
n8n_node: "n8n-nodes-base.code"
notes: "JavaScript or Python code execution"
concepts:
"Multi-step Zap":
n8n_equivalent: "Linear workflow with connected nodes"
"Paths":
n8n_equivalent: "IF node with multiple branches"
"Filters":
n8n_equivalent: "IF node with conditions"
"Formatter":
n8n_equivalent: "Set node or Code node"
"Looping":
n8n_equivalent: "Split In Batches node"
# Make (Integromat) to n8n mappings
make:
triggers:
"Webhook":
n8n_node: "n8n-nodes-base.webhook"
notes: "Direct equivalent"
"Watch Records":
n8n_node: "n8n-nodes-base.scheduleTrigger"
notes: "Combine with polling logic in Code node"
"Custom Webhook":
n8n_node: "n8n-nodes-base.webhook"
notes: "Configure response mode"
actions:
"HTTP Request":
n8n_node: "n8n-nodes-base.httpRequest"
notes: "Map all HTTP parameters"
"Router":
n8n_node: "n8n-nodes-base.switch"
notes: "Multiple conditional branches"
"Iterator":
n8n_node: "n8n-nodes-base.splitInBatches"
notes: "Process array items individually"
"Aggregator":
n8n_node: "n8n-nodes-base.merge"
notes: "Combine data from multiple sources"
"Data Store":
n8n_node: "n8n-nodes-base.redis"
notes: "Use Redis or database node for storage"
"JSON Parser":
n8n_node: "n8n-nodes-base.code"
notes: "Parse JSON in Code node"
"Text Parser":
n8n_node: "n8n-nodes-base.set"
notes: "Use expressions for text manipulation"
concepts:
"Scenario":
n8n_equivalent: "Workflow"
"Module":
n8n_equivalent: "Node"
"Route":
n8n_equivalent: "Connection"
"Filter":
n8n_equivalent: "IF node"
"Router":
n8n_equivalent: "Switch node or multiple IF nodes"
"Iterator":
n8n_equivalent: "Split In Batches node"
"Aggregator":
n8n_equivalent: "Merge node"
# HubSpot Workflows to n8n mappings
hubspot:
triggers:
"Contact Property Change":
n8n_node: "n8n-nodes-base.hubspotTrigger"
notes: "Configure webhook for property updates"
"Deal Stage Change":
n8n_node: "n8n-nodes-base.hubspotTrigger"
notes: "Monitor deal pipeline changes"
"Form Submission":
n8n_node: "n8n-nodes-base.hubspotTrigger"
notes: "Webhook for form submissions"
"List Membership":
n8n_node: "n8n-nodes-base.scheduleTrigger"
notes: "Poll HubSpot API for list changes"
actions:
"Update Contact Property":
n8n_node: "n8n-nodes-base.hubspot"
parameters:
resource: "contact"
operation: "update"
"Create Deal":
n8n_node: "n8n-nodes-base.hubspot"
parameters:
resource: "deal"
operation: "create"
"Send Email":
n8n_node: "n8n-nodes-base.hubspot"
parameters:
resource: "email"
operation: "send"
"Add to List":
n8n_node: "n8n-nodes-base.hubspot"
parameters:
resource: "contact"
operation: "addToList"
"Create Task":
n8n_node: "n8n-nodes-base.hubspot"
parameters:
resource: "task"
operation: "create"
concepts:
"Enrollment Trigger":
n8n_equivalent: "Trigger node (webhook or schedule)"
"If/Then Branch":
n8n_equivalent: "IF node"
"Delay":
n8n_equivalent: "Wait node"
"Goal":
n8n_equivalent: "IF node checking completion criteria"
"Re-enrollment":
n8n_equivalent: "Workflow settings with loop detection"
# Microsoft Power Automate to n8n mappings
power_automate:
triggers:
"When an item is created":
n8n_node: "n8n-nodes-base.webhook"
notes: "Configure webhook for item creation events"
"Recurrence":
n8n_node: "n8n-nodes-base.scheduleTrigger"
notes: "Convert recurrence pattern to cron"
"When a HTTP request is received":
n8n_node: "n8n-nodes-base.webhook"
notes: "Direct equivalent"
actions:
"HTTP":
n8n_node: "n8n-nodes-base.httpRequest"
notes: "Map all HTTP parameters"
"Condition":
n8n_node: "n8n-nodes-base.if"
notes: "Convert condition logic"
"Apply to each":
n8n_node: "n8n-nodes-base.splitInBatches"
notes: "Process array items"
"Compose":
n8n_node: "n8n-nodes-base.set"
notes: "Data transformation"
"Parse JSON":
n8n_node: "n8n-nodes-base.code"
notes: "Parse JSON in Code node"
"Delay":
n8n_node: "n8n-nodes-base.wait"
notes: "Convert delay duration"
concepts:
"Flow":
n8n_equivalent: "Workflow"
"Action":
n8n_equivalent: "Node"
"Condition":
n8n_equivalent: "IF node"
"Switch":
n8n_equivalent: "Switch node"
"Scope":
n8n_equivalent: "Error handling with try/catch in Code node"
"Apply to each":
n8n_equivalent: "Split In Batches node"
# Common patterns across platforms
common_patterns:
conditional_logic:
description: "If/then/else branching"
n8n_implementation: "IF node with true/false branches"
loops:
description: "Iterate over array items"
n8n_implementation: "Split In Batches node"
data_transformation:
description: "Transform, format, or map data"
n8n_implementation: "Set node or Code node"
error_handling:
description: "Handle errors and retries"
n8n_implementation: "Node settings: continueOnFail, retryOnFail, maxTries"
delays:
description: "Wait before next action"
n8n_implementation: "Wait node with duration"
webhooks:
description: "Receive HTTP requests"
n8n_implementation: "Webhook node with response configuration"
api_calls:
description: "Make HTTP requests to APIs"
n8n_implementation: "HTTP Request node"
parallel_execution:
description: "Execute multiple actions simultaneously"
n8n_implementation: "Multiple connections from single node"
merge_data:
description: "Combine data from multiple sources"
n8n_implementation: "Merge node"
# Migration considerations
migration_notes:
authentication:
- "Recreate all credentials in n8n"
- "OAuth flows may need re-authorization"
- "API keys and tokens must be securely stored"
scheduling:
- "Convert platform-specific schedules to cron expressions"
- "Consider timezone differences"
- "Test schedule triggers before going live"
data_formats:
- "Verify JSON structure compatibility"
- "Check date/time format conversions"
- "Validate data type mappings"
error_handling:
- "Implement retry logic where needed"
- "Add error notification workflows"
- "Test failure scenarios"
testing:
- "Test with sample data first"
- "Verify all integrations work correctly"
- "Monitor initial executions closely"
- "Compare outputs with original platform"

View File

@ -0,0 +1,74 @@
# Create n8n Workflow - Validation Checklist
## Workflow Structure
- [ ] Workflow has a valid name
- [ ] Workflow contains at least one trigger node
- [ ] All nodes have unique IDs
- [ ] All nodes have unique names
- [ ] Workflow JSON is valid and parseable
## Node Configuration
- [ ] Trigger node is properly configured
- [ ] All action nodes have required parameters set
- [ ] Node types are valid n8n node types
- [ ] Node positions are set and don't overlap
- [ ] TypeVersion is set for all nodes (usually 1)
## Connections
- [ ] All nodes are connected (no orphaned nodes except trigger)
- [ ] All connections reference existing node names
- [ ] Connection types are set correctly (usually "main")
- [ ] Connection indices are correct (0 for default, 0/1 for IF nodes)
- [ ] No circular dependencies (unless intentional loops)
## Error Handling
- [ ] Error handling strategy matches requirements
- [ ] Critical nodes have retry logic if needed
- [ ] continueOnFail is set appropriately
- [ ] maxTries and waitBetweenTries are configured if retries enabled
## Data Flow
- [ ] Data transformations are properly configured
- [ ] Set nodes have correct value mappings
- [ ] Code nodes have valid JavaScript/Python code
- [ ] Expressions use correct n8n syntax (={{ }})
## Integrations
- [ ] All required integrations are included
- [ ] Credential placeholders are set for authenticated services
- [ ] API endpoints and methods are correct
- [ ] Request/response formats are properly configured
## Best Practices
- [ ] Workflow follows n8n naming conventions
- [ ] Nodes are logically organized and positioned
- [ ] Complex logic is broken into manageable steps
- [ ] Workflow is documented (node names are descriptive)
## Testing Readiness
- [ ] Workflow can be imported into n8n without errors
- [ ] All required credentials are identified
- [ ] Test data requirements are clear
- [ ] Expected outputs are defined
## File Output
- [ ] File is saved to correct location
- [ ] File has .json extension
- [ ] File is valid JSON (passes JSON.parse)
- [ ] File size is reasonable (not corrupted)
## Documentation
- [ ] User has been informed how to import workflow
- [ ] Credential requirements have been communicated
- [ ] Testing instructions have been provided
- [ ] Any special configuration notes have been shared

View File

@ -0,0 +1,449 @@
# Create n8n Workflow - Workflow Instructions
```xml
<critical>The workflow execution engine is governed by: {project_root}/{bmad_folder}/core/tasks/workflow.xml</critical>
<critical>You MUST have already loaded and processed: {installed_path}/workflow.yaml</critical>
<critical>This workflow creates a new n8n workflow from scratch based on user requirements.</critical>
<workflow>
<step n="0" goal="Load Config and Check Prerequisites">
<critical>Load configuration and check for requirements file before proceeding</critical>
<action>Resolve variables from config_source: workflows_folder, requirements_folder, output_folder, user_name, communication_language</action>
<action>Create {{workflows_folder}} directory if it does not exist</action>
<action>Create {{requirements_folder}} directory if it does not exist</action>
<action>Search for requirements files in {{requirements_folder}}</action>
<action>List all files matching pattern: req-*.md</action>
<check if="no requirements files found">
<output>⚠️ No Requirements File Found
Before creating a workflow, you need to gather requirements.
**Options:**
1. Run `*gather-requirements` to create a requirements file
2. Provide requirements manually in this session
Would you like to:
a) Run gather-requirements workflow now
b) Continue without requirements file (manual elicitation)
Enter your choice (a/b):</output>
<action>WAIT for user input</action>
<check if="user chooses 'a'">
<action>Invoke workflow: {project-root}/{bmad_folder}/autominator/workflows/gather-requirements/workflow.yaml</action>
<action>After gather-requirements completes, reload this step to find the new requirements file</action>
</check>
<check if="user chooses 'b'">
<action>Set {{requirements_file}} = empty</action>
<action>Proceed to Step 1 for manual elicitation</action>
</check>
</check>
<check if="one requirements file found">
<action>Set {{requirements_file}} to the found file path</action>
<action>Load and parse requirements file COMPLETELY</action>
<action>Extract requirements: workflow_name, problem_description, trigger_type, data_requirements, desired_outcome, integrations, conditional_logic, criticality</action>
<action>Extract research findings: use_case_research, node_research, parameter_structures, workflow_pattern_research</action>
<action>Display loaded requirements summary to user</action>
<action>Skip to Step 4 (Plan Workflow Structure) - research already done</action>
</check>
<check if="multiple requirements files found">
<output>📋 Multiple Requirements Files Found:
[Display numbered list of files with workflow names]
Which requirements file would you like to use?
Enter the number (1-N) or 'new' to create a new one:</output>
<action>WAIT for user input</action>
<check if="user enters number">
<action>Set {{requirements_file}} to selected file path</action>
<action>Load and parse requirements file COMPLETELY</action>
<action>Extract requirements: workflow_name, problem_description, trigger_type, data_requirements, desired_outcome, integrations, conditional_logic, criticality</action>
<action>Extract research findings: use_case_research, node_research, parameter_structures, workflow_pattern_research</action>
<action>Display loaded requirements summary to user</action>
<action>Skip to Step 4 (Plan Workflow Structure) - research already done</action>
</check>
<check if="user enters 'new'">
<action>Invoke workflow: {project-root}/{bmad_folder}/autominator/workflows/gather-requirements/workflow.yaml</action>
<action>After gather-requirements completes, reload this step to find the new requirements file</action>
</check>
</check>
</step>
<step n="1" goal="Gather Requirements" elicit="true">
<critical>Start by understanding the ACTUAL PROBLEM the user wants to solve, not just technical requirements</critical>
<action>Ask Question 1: "What problem are you trying to solve with this automation?"</action>
<action>Encourage detailed explanation: "Describe the current manual process, pain points, and desired outcome."</action>
<action>WAIT for user input</action>
<action>Store in {{problem_description}}</action>
<action>Ask Question 2: "What triggers this process? When should the automation run?"</action>
<action>Present numbered options:
1. When data arrives - Webhook, form submission, API call
2. On a schedule - Every hour, daily, weekly, custom cron
3. When something changes - Database update, file change, service event
4. Manually - On-demand execution
5. Multiple triggers - Combination of above
6. Not sure - Help me decide based on my problem
</action>
<action>WAIT for user selection (1-6)</action>
<action>Store selection in {{trigger_type}}</action>
<check if="selection is 6 (Not sure)">
<action>Analyze {{problem_description}} and suggest appropriate trigger</action>
<action>Ask: "Based on your problem, I recommend [trigger type]. Does this make sense?"</action>
<action>WAIT for confirmation or adjustment</action>
<action>Store final trigger in {{trigger_type}}</action>
</check>
<action>Ask Question 3: "What data or information does this workflow need to work with?"</action>
<action>Examples: "Customer data, order details, form responses, API data, etc."</action>
<action>WAIT for user input</action>
<action>Store in {{data_requirements}}</action>
<action>Ask Question 4: "What should happen with this data? What's the desired outcome?"</action>
<action>Examples: "Send to Slack, update database, create invoice, notify team, etc."</action>
<action>WAIT for user input</action>
<action>Store in {{desired_outcome}}</action>
<action>Ask Question 5: "What services or systems are involved?"</action>
<action>Examples: "Slack, Google Sheets, PostgreSQL, HubSpot, custom API, etc."</action>
<action>WAIT for user input</action>
<action>Store in {{integrations}}</action>
<action>Ask Question 6: "Are there any conditions or decision points in this process?"</action>
<action>Examples: "If amount > $1000, notify manager; If status = 'urgent', send immediately"</action>
<action>Present numbered options:
1. No - Straight-through processing
2. Yes - Describe the conditions
</action>
<action>WAIT for user selection (1-2)</action>
<check if="selection is 2">
<action>Ask: "Describe the conditions and what should happen in each case"</action>
<action>WAIT for user input</action>
<action>Store in {{conditional_logic}}</action>
</check>
<action>Ask Question 7: "How critical is this workflow? What happens if it fails?"</action>
<action>Present numbered options:
1. Low - Can retry manually if needed
2. Medium - Should retry automatically, notify on failure
3. High - Must succeed, need alerts and logging
4. Critical - Business-critical, need comprehensive error handling
</action>
<action>WAIT for user selection (1-4)</action>
<action>Store selection in {{criticality}}</action>
<action>Ask Question 8: "What should the workflow be named?"</action>
<action>Suggest name based on {{problem_description}}</action>
<action>WAIT for user input</action>
<action>Store in {{workflow_name}}</action>
<action>Ask Question 9: "Where should the workflow file be saved?"</action>
<action>Present numbered options:
1. Default location - workflows/[workflow-name].json
2. Custom path - Specify your own file path
</action>
<action>WAIT for user selection (1-2)</action>
<check if="selection is 2">
<action>Ask for specific path</action>
<action>WAIT for user input</action>
</check>
<action>Store final path in {{save_location}}</action>
<action>Summarize understanding:</action>
<action>- Problem: {{problem_description}}</action>
<action>- Trigger: {{trigger_type}}</action>
<action>- Data: {{data_requirements}}</action>
<action>- Outcome: {{desired_outcome}}</action>
<action>- Services: {{integrations}}</action>
<action>- Conditions: {{conditional_logic}}</action>
<action>- Criticality: {{criticality}}</action>
<action>Ask: "Does this capture your requirements correctly?"</action>
<action>Present numbered options:
1. Yes - Proceed with workflow creation
2. No - Let me clarify or add details
</action>
<action>WAIT for user selection (1-2)</action>
<check if="selection is 2">
<action>Ask: "What needs to be clarified or added?"</action>
<action>WAIT for user input</action>
<action>Update relevant variables</action>
<action>Repeat summary and confirmation</action>
</check>
</step>
<step n="2" goal="Research n8n Documentation">
<critical>Search for up-to-date n8n documentation based on user requirements</critical>
<action>Inform user: "Researching n8n documentation for your workflow requirements..."</action>
<action>Perform web search for n8n documentation on:</action>
<action>1. Trigger type: {{trigger_type}}</action>
<action>2. Integrations: {{integrations}}</action>
<action>3. Conditional logic: {{conditional_logic}}</action>
<action>4. Error handling: {{criticality}}</action>
<action>Search queries to use:</action>
<action>- "n8n [trigger_type] node documentation"</action>
<action>- "n8n [integration] node setup"</action>
<action>- "n8n workflow best practices"</action>
<action>- "n8n error handling retry logic"</action>
<action>Focus on official n8n documentation at docs.n8n.io</action>
<action>Store relevant documentation snippets for reference</action>
<action>Note any specific node configurations or parameters needed</action>
</step>
<step n="3" goal="Verify Documentation Understanding">
<action>Summarize key findings from documentation:</action>
<action>- Available node types for requirements</action>
<action>- Required parameters and configurations</action>
<action>- Best practices for this use case</action>
<action>- Any limitations or considerations</action>
<action>Inform user: "Based on n8n documentation, I found the necessary nodes and configurations for your workflow."</action>
</step>
<step n="4" goal="Plan Workflow Structure">
<critical>Design workflow based on the ACTUAL PROBLEM, not just technical specs</critical>
<action>Analyze the problem and requirements:</action>
<action>- Problem to solve: {{problem_description}}</action>
<action>- Trigger: {{trigger_type}}</action>
<action>- Data needed: {{data_requirements}}</action>
<action>- Desired outcome: {{desired_outcome}}</action>
<action>- Services: {{integrations}}</action>
<action>- Conditions: {{conditional_logic}}</action>
<action>- Criticality: {{criticality}}</action>
<action>Design workflow structure that solves the problem:</action>
<action>1. Map trigger to appropriate n8n trigger node</action>
<action>2. Design data acquisition steps (API calls, database queries)</action>
<action>3. Plan data transformations needed for the outcome</action>
<action>4. Implement conditional logic from {{conditional_logic}}</action>
<action>5. Design actions to achieve {{desired_outcome}}</action>
<action>6. Add error handling based on {{criticality}}</action>
<action>7. Plan node connections and data flow</action>
<action>Present the solution-focused workflow plan:</action>
<action>## Workflow Solution for: {{problem_description}}</action>
<action></action>
<action>**How it works:**</action>
<action>[Explain in plain language how the workflow solves the problem]</action>
<action></action>
<action>**Workflow Steps:**</action>
<action>1. Trigger: [When/how it starts] - [n8n node type]</action>
<action>2. Get Data: [What data is retrieved] - [n8n nodes]</action>
<action>3. Process: [How data is transformed] - [n8n nodes]</action>
<action>4. Decide: [Conditional logic if any] - [IF/Switch nodes]</action>
<action>5. Act: [Final actions to achieve outcome] - [n8n nodes]</action>
<action>6. Handle Errors: [Error strategy] - [Error handling config]</action>
<action></action>
<action>**Expected Result:**</action>
<action>[Describe what happens when workflow runs successfully]</action>
<action>Ask: "Does this workflow solve your problem?"</action>
<action>Present numbered options:
1. Yes - This solves my problem, proceed
2. No - Missing something important
3. Partially - Needs adjustments
4. Explain more - I need clarification
</action>
<action>WAIT for user selection (1-4)</action>
<check if="selection is 2">
<action>Ask: "What's missing? What else needs to happen?"</action>
<action>WAIT for user input</action>
<action>Adjust workflow design to include missing elements</action>
<action>Repeat this step</action>
</check>
<check if="selection is 3">
<action>Ask: "What needs to be adjusted?"</action>
<action>WAIT for user input</action>
<action>Modify workflow design based on feedback</action>
<action>Repeat this step</action>
</check>
<check if="selection is 4">
<action>Ask: "Which part needs clarification?"</action>
<action>WAIT for user input</action>
<action>Provide detailed explanation of that part</action>
<action>Repeat this step</action>
</check>
</step>
<step n="5" goal="Load Templates and Resources">
<action>Load {{templates}} file</action>
<action>Identify closest matching template based on workflow type</action>
<action>Load {{helpers}} for node creation guidelines</action>
<action>Extract relevant template sections</action>
</step>
<step n="6" goal="Build Workflow JSON">
<critical>Use EXACT node types and parameter structures from {{node_research}} and {{parameter_structures}}</critical>
<critical>Follow modern n8n format from {{helpers}}</critical>
<action>Initialize workflow structure with modern n8n format:</action>
<substep>
{
"name": "{{workflow_name}}",
"nodes": [],
"pinData": {},
"connections": {},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "[generate UUID]",
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "[generate UUID]"
},
"id": "[generate short ID]",
"tags": []
}
</substep>
<action>Build nodes ONE at a time following these rules:</action>
<substep>For Each Node (Use EXACT structures from research):
1. Generate UUID for node ID (format: "f8b7ff4f-6375-4c79-9b2c-9814bfdd0c92")
2. Set node name (unique, descriptive)
3. Use EXACT node type from {{node_research}}:
- MUST be format: "n8n-nodes-base.nodeName"
- NEVER use: "@n8n/n8n-nodes-*" format
- Example: "n8n-nodes-base.gmail" NOT "@n8n/n8n-nodes-gmail.gmail"
4. Use EXACT typeVersion from {{node_research}}:
- MUST be INTEGER (2, 3, 4)
- NEVER use float (2.1, 3.4)
5. Calculate position as INTEGER array:
- Format: [x, y] where x and y are integers
- First node (trigger): [240, 300]
- Subsequent nodes: add 220 to x for each step
- Branches: adjust y by ±100
6. Use EXACT parameter structure from {{parameter_structures}}:
- For Set node (v3+): use assignments.assignments structure
- For Gmail node (v2+): use "message" parameter (NOT "text")
- For IF node (v2+): use conditions.conditions structure (NO "name" field in conditions)
- For Slack channel: use __rl flag with mode and cachedResultName
- Copy structure EXACTLY from research, don't modify
7. Add webhookId (UUID) if node type is webhook
8. Add credentials if needed
9. Field order: parameters, id, name, type, typeVersion, position, webhookId, credentials
10. Store node name in list for validation
</substep>
<substep>For Each Connection (CRITICAL FORMAT):
1. Identify source node name (must match node "name" field exactly)
2. Identify target node name (must match node "name" field exactly)
3. Create connection entry with CORRECT format:
"Source Node Name": {
"main": [
[
{
"node": "Target Node Name",
"type": "main",
"index": 0
}
]
]
}
4. CRITICAL: The "main" wrapper object is REQUIRED
5. NEVER use format: "Source": [[{...}]] (missing "main" wrapper)
6. For IF nodes:
- index 0 = true branch
- index 1 = false branch
7. Validate all referenced nodes exist in node names list
</substep>
<substep>Node Building Order:
1. Trigger node
2. Main flow action nodes
3. Conditional nodes (IF/Switch)
4. Branch nodes
5. Merge nodes
6. Final action nodes
7. Connect all nodes
</substep>
<action>Apply error handling based on {{error_handling}} selection</action>
<action>Validate all node IDs are unique</action>
<action>Validate all node names are unique</action>
<action>Validate all connections reference existing nodes</action>
</step>
<step n="7" goal="Optimize and Save">
<action>Review workflow for optimization:</action>
<action>- Remove any unused nodes</action>
<action>- Verify node positions don't overlap</action>
<action>- Ensure proper spacing and alignment</action>
<action>- Validate all required parameters are set</action>
<action>Resolve final save path:</action>
<check if="{{save_location}} was provided by user">
<action>Use {{save_location}} as-is</action>
</check>
<check if="{{save_location}} is empty or default">
<action>Use {{workflows_folder}}/{{workflow_name}}.json</action>
<action>Ensure {{workflows_folder}} directory exists</action>
<action>Store resolved path in {{save_location}}</action>
</check>
<action>Save workflow to {{save_location}}</action>
</step>
<step n="8" goal="Validate JSON Syntax">
<critical>NEVER delete the file if validation fails - always fix syntax errors</critical>
<action>Run: node -e "JSON.parse(require('fs').readFileSync('{{save_location}}', 'utf8')); console.log('✓ Valid JSON')"</action>
<check if="validation fails (exit code 1)">
<action>Read the error message carefully - it shows the syntax error and position</action>
<action>Open the file and navigate to the error location</action>
<action>Fix the syntax error (add missing comma, bracket, or quote as indicated)</action>
<action>Save the file</action>
<action>Re-run validation with the same command</action>
<action>Repeat until validation passes</action>
</check>
<action>Once validation passes, confirm with user: "n8n workflow created at {{save_location}}"</action>
</step>
<step n="9" goal="Provide Usage Instructions">
<action>Inform user how to use the workflow:</action>
<action>1. Import the JSON file into n8n</action>
<action>2. Configure credentials for integrated services</action>
<action>3. Test the workflow with sample data</action>
<action>4. Activate the workflow when ready</action>
<action>Ask: "Would you like me to explain any part of the workflow?"</action>
<action>Present numbered options:
1. No - I'm good to go
2. Yes - Explain specific nodes
3. Yes - Explain the overall flow
4. Yes - Explain how to test it
</action>
<action>WAIT for user selection (1-4)</action>
<check if="selection is 2, 3, or 4">
<action>Provide requested explanation</action>
</check>
</step>
<step n="10" goal="Validate Content">
<invoke-task>Validate against checklist at {{validation}} using {{bmad_folder}}/core/tasks/validate-workflow.xml</invoke-task>
</step>
</workflow>
```

View File

@ -0,0 +1,43 @@
name: create-workflow
description: "Create new n8n workflow from scratch based on requirements"
author: "Saif"
# Critical variables from config
config_source: "{project-root}/{bmad_folder}/autominator/config.yaml"
output_folder: "{config_source}:output_folder"
user_name: "{config_source}:user_name"
communication_language: "{config_source}:communication_language"
workflows_folder: "{config_source}:workflows_folder"
requirements_folder: "{config_source}:requirements_folder"
date: system-generated
# Workflow components
installed_path: "{project-root}/{bmad_folder}/autominator/workflows/create-workflow"
shared_path: "{project-root}/{bmad_folder}/autominator/workflows/_shared"
instructions: "{installed_path}/instructions.md"
validation: "{installed_path}/checklist.md"
# Shared resources
helpers: "{shared_path}/n8n-helpers.md"
templates: "{shared_path}/n8n-templates.yaml"
platform_mappings: "{shared_path}/platform-mappings.yaml"
# Variables
variables:
requirements_file: "" # Will be discovered or elicited
workflow_type: "" # Will be loaded from requirements or elicited
trigger_type: "" # Will be loaded from requirements or elicited
integrations: [] # Will be loaded from requirements or elicited
complexity: "" # Will be elicited
error_handling: "" # Will be elicited
workflow_name: "" # Will be loaded from requirements or elicited
problem_description: "" # Will be loaded from requirements
data_requirements: "" # Will be loaded from requirements
desired_outcome: "" # Will be loaded from requirements
conditional_logic: "" # Will be loaded from requirements
criticality: "" # Will be loaded from requirements
default_output_file: "{workflows_folder}/{workflow_name}.json"
standalone: true
web_bundle: false

View File

@ -0,0 +1,25 @@
# Gather Requirements - Validation Checklist
## Requirements Completeness
- [ ] Problem statement is clear and specific
- [ ] Trigger type is defined
- [ ] Data requirements are documented
- [ ] Desired outcome is clear
- [ ] All integrations are listed
- [ ] Conditional logic is documented (or marked as not needed)
- [ ] Criticality level is set
- [ ] Workflow name is descriptive
## Document Quality
- [ ] Requirements file is saved to correct location
- [ ] All template fields are filled
- [ ] No placeholder text remains
- [ ] Change log is initialized
## Readiness
- [ ] Requirements are sufficient to create workflow
- [ ] User has confirmed requirements are correct
- [ ] File is ready for use by create-workflow

View File

@ -0,0 +1,190 @@
# Gather Requirements - Workflow Instructions
```xml
<critical>The workflow execution engine is governed by: {project_root}/{bmad_folder}/core/tasks/workflow.xml</critical>
<critical>You MUST have already loaded and processed: {installed_path}/workflow.yaml</critical>
<critical>This workflow gathers requirements for n8n workflow creation.</critical>
<workflow>
<step n="1" goal="Load Config and Initialize">
<action>Resolve variables from config_source: requirements_folder, output_folder, user_name, communication_language</action>
<action>Create {{requirements_folder}} directory if it does not exist</action>
<action>Load template from {{template}}</action>
</step>
<step n="2" goal="Gather Requirements" elicit="true">
<critical>Ask questions ONE AT A TIME and WAIT for user response after each question</critical>
<ask>Question 1: What problem are you trying to solve with this automation?
Describe the current manual process, pain points, and desired outcome.</ask>
<action>WAIT for user input</action>
<action>Store response in {{problem_description}}</action>
<action>Perform web search to understand the use case:</action>
<action>- "n8n workflow for [problem description] site:docs.n8n.io"</action>
<action>- "n8n automation [problem description] best practices"</action>
<action>Store findings in {{use_case_research}}</action>
<ask>Question 2: What triggers this process? When should the automation run?
Options:
1. When data arrives - Webhook, form submission, API call
2. On a schedule - Every hour, daily, weekly, custom cron
3. When something changes - Database update, file change, service event
4. Manually - On-demand execution
5. Multiple triggers - Combination of above
6. Not sure - Help me decide based on my problem
Enter your selection (1-6):</ask>
<action>WAIT for user input</action>
<action>Store response in {{trigger_type}}</action>
<check if="selection is 6">
<action>Analyze {{problem_description}} and suggest appropriate trigger</action>
<ask>Based on your problem, I recommend [trigger type]. Does this make sense? (yes/no)</ask>
<action>WAIT for confirmation</action>
<action>Store final trigger in {{trigger_type}}</action>
</check>
<ask>Question 3: What data or information does this workflow need to work with?
Examples: Customer data, order details, form responses, API data, etc.</ask>
<action>WAIT for user input</action>
<action>Store response in {{data_requirements}}</action>
<ask>Question 4: What should happen with this data? What's the desired outcome?
Examples: Send to Slack, update database, create invoice, notify team, etc.</ask>
<action>WAIT for user input</action>
<action>Store response in {{desired_outcome}}</action>
<ask>Question 5: What services or systems are involved?
Examples: Slack, Google Sheets, PostgreSQL, HubSpot, custom API, etc.</ask>
<action>WAIT for user input</action>
<action>Store response in {{integrations}}</action>
<action>Research EXACT n8n node types for each integration:</action>
<action>For each service in {{integrations}}:</action>
<action>1. Search: "n8n [service] node documentation site:docs.n8n.io"</action>
<action>2. Extract EXACT node type string (e.g., "n8n-nodes-base.webhook")</action>
<action>3. Extract typeVersion (e.g., 2.1)</action>
<action>4. Extract available parameters structure</action>
<action>5. Extract example usage from docs</action>
<action>6. Note if trigger node or action node</action>
<action>Store all findings in {{node_research}}</action>
<ask>Question 6: Are there any conditions or decision points in this process?
Examples: If amount > $1000, notify manager; If status = 'urgent', send immediately
Options:
1. No - Straight-through processing
2. Yes - Describe the conditions
Enter your selection (1-2):</ask>
<action>WAIT for user input</action>
<check if="selection is 2">
<ask>Describe the conditions and what should happen in each case:</ask>
<action>WAIT for user input</action>
<action>Store response in {{conditional_logic}}</action>
</check>
<check if="selection is 1">
<action>Store "No conditional logic required" in {{conditional_logic}}</action>
</check>
<ask>Question 7: How critical is this workflow? What happens if it fails?
Options:
1. Low - Can retry manually if needed
2. Medium - Should retry automatically, notify on failure
3. High - Must succeed, need alerts and logging
4. Critical - Business-critical, need comprehensive error handling
Enter your selection (1-4):</ask>
<action>WAIT for user input</action>
<action>Store selection in {{criticality}}</action>
<ask>Question 8: What should the workflow be named?</ask>
<action>WAIT for user input</action>
<action>Store response in {{workflow_name}}</action>
<action>Generate {{workflow_slug}} from {{workflow_name}} (lowercase, hyphens, no spaces)</action>
<action>Display summary:
- Problem: {{problem_description}}
- Trigger: {{trigger_type}}
- Data: {{data_requirements}}
- Outcome: {{desired_outcome}}
- Services: {{integrations}}
- Conditions: {{conditional_logic}}
- Criticality: {{criticality}}
- Name: {{workflow_name}}
</action>
<ask>Does this capture your requirements correctly?
Options:
1. Yes - Save requirements
2. No - Let me clarify or add details
Enter your selection (1-2):</ask>
<action>WAIT for user input</action>
<check if="selection is 2">
<ask>What needs to be clarified or added?</ask>
<action>WAIT for user input</action>
<action>Update relevant variables based on feedback</action>
<action>Repeat summary and confirmation</action>
</check>
</step>
<step n="3" goal="Research Workflow Pattern">
<action>Perform comprehensive web search for workflow pattern:</action>
<action>- "n8n workflow pattern [trigger_type] to [desired_outcome] site:docs.n8n.io"</action>
<action>- "n8n [integrations] workflow example site:docs.n8n.io"</action>
<action>- "n8n best practices [use case] site:docs.n8n.io"</action>
<action>Store findings in {{workflow_pattern_research}}</action>
<action>Research parameter structures for each node type:</action>
<action>For each node type in {{node_research}}:</action>
<action>1. Search: "n8n [node type] parameters documentation site:docs.n8n.io"</action>
<action>2. Extract EXACT parameter structure from docs</action>
<action>3. Extract required vs optional parameters</action>
<action>4. Extract parameter data types</action>
<action>5. Extract example values</action>
<action>Store in {{parameter_structures}}</action>
</step>
<step n="4" goal="Save Requirements Document">
<action>Resolve output path: {{default_output_file}} using {{workflow_slug}}</action>
<action>Fill template with all gathered variables AND research findings</action>
<action>Include in document:</action>
<action>- Problem description and requirements</action>
<action>- Use case research findings</action>
<action>- EXACT node types with typeVersions</action>
<action>- EXACT parameter structures from docs</action>
<action>- Workflow pattern recommendations</action>
<action>- Best practices from research</action>
<action>Save document to {{default_output_file}}</action>
<action>Report saved file path to user</action>
<output>✅ Requirements Saved Successfully!
**File:** {{default_output_file}}
**Next Steps:**
1. Review the requirements file
2. Run `*create-workflow` to generate the n8n workflow
(The create-workflow will automatically load this requirements file)
**Note:** You can edit the requirements file manually before creating the workflow.
</output>
</step>
<step n="5" goal="Validate Content">
<invoke-task>Validate against checklist at {{validation}} using {{bmad_folder}}/core/tasks/validate-workflow.xml</invoke-task>
</step>
</workflow>
```

View File

@ -0,0 +1,75 @@
# Workflow Requirements: {{workflow_name}}
**Created:** {{date}}
**Status:** Requirements Gathered
**Criticality:** {{criticality}}
---
## Problem Statement
{{problem_description}}
---
## Workflow Overview
**Trigger:** {{trigger_type}}
**Desired Outcome:** {{desired_outcome}}
---
## Data Requirements
{{data_requirements}}
---
## Integrations
{{integrations}}
---
## Conditional Logic
{{conditional_logic}}
---
## Research Findings
### Use Case Research
{{use_case_research}}
### Node Types (From n8n Documentation)
{{node_research}}
### Parameter Structures (From n8n Documentation)
{{parameter_structures}}
### Workflow Pattern Recommendations
{{workflow_pattern_research}}
---
## Technical Notes
- Requirements gathered: {{date}}
- Research completed from n8n documentation
- All node types and parameters verified from docs.n8n.io
- Ready for workflow creation
- Use this file as input for `*create-workflow`
---
## Change Log
| Date | Change | Author |
| -------- | ----------------------------- | ------------- |
| {{date}} | Initial requirements gathered | {{user_name}} |

View File

@ -0,0 +1,34 @@
name: gather-requirements
description: "Gather and document workflow requirements before creating n8n workflow"
author: "Saif"
# Critical variables from config
config_source: "{project-root}/{bmad_folder}/autominator/config.yaml"
output_folder: "{config_source}:output_folder"
user_name: "{config_source}:user_name"
communication_language: "{config_source}:communication_language"
requirements_folder: "{config_source}:requirements_folder"
date: system-generated
# Workflow components
installed_path: "{project-root}/{bmad_folder}/autominator/workflows/gather-requirements"
template: "{installed_path}/template.md"
instructions: "{installed_path}/instructions.md"
validation: "{installed_path}/checklist.md"
# Variables
variables:
workflow_name: "" # Will be elicited
workflow_slug: "" # Generated from workflow_name
problem_description: "" # Will be elicited
trigger_type: "" # Will be elicited
data_requirements: "" # Will be elicited
desired_outcome: "" # Will be elicited
integrations: "" # Will be elicited
conditional_logic: "" # Will be elicited
criticality: "" # Will be elicited
default_output_file: "{requirements_folder}/req-{workflow_slug}.md"
standalone: true
web_bundle: false

View File

@ -0,0 +1,110 @@
# Migrate Workflow to n8n - Validation Checklist
## Source Analysis
- [ ] Source platform was identified
- [ ] Source workflow details were gathered
- [ ] Trigger type was identified
- [ ] All integrations were identified
- [ ] Workflow complexity was assessed
## Platform Mapping
- [ ] Platform mappings were loaded
- [ ] Source trigger was mapped to n8n trigger
- [ ] All source actions were mapped to n8n nodes
- [ ] Conditional logic was mapped correctly
- [ ] Loops/iterations were mapped correctly
- [ ] Data transformations were identified
## Workflow Structure
- [ ] n8n workflow has valid JSON structure
- [ ] Workflow name is set
- [ ] Migration tag is added (migrated-from-[platform])
- [ ] All nodes have unique IDs
- [ ] All nodes have unique names
- [ ] Trigger node is properly configured
## Node Configuration
- [ ] All mapped nodes are created
- [ ] Node types are valid n8n types
- [ ] Node parameters are configured
- [ ] Credentials placeholders are set
- [ ] Node positions are calculated correctly
- [ ] No overlapping nodes
## Data Mappings
- [ ] Field mappings from source to n8n are correct
- [ ] Data type conversions are handled
- [ ] Date/time format differences are addressed
- [ ] Expressions use correct n8n syntax (={{ }})
- [ ] Set nodes are used for simple transformations
- [ ] Code nodes are used for complex transformations
## Conditional Logic
- [ ] IF nodes are created for conditional branches
- [ ] Switch nodes are created for multiple conditions
- [ ] Conditions are properly configured
- [ ] True/false branches are correct (index 0/1)
- [ ] All branches are connected
## Connections
- [ ] All nodes are connected properly
- [ ] Trigger connects to first action
- [ ] Actions are connected in sequence
- [ ] Conditional branches are connected
- [ ] Merge points are connected
- [ ] All connections reference existing nodes
- [ ] No orphaned nodes (except trigger)
## Error Handling
- [ ] Error handling strategy is defined
- [ ] Critical nodes have retry logic if needed
- [ ] continueOnFail is set appropriately
- [ ] Error handling matches or improves on source
## Migration Notes
- [ ] Source platform is documented
- [ ] Migration date is recorded
- [ ] Credentials needed are listed
- [ ] Platform-specific differences are noted
- [ ] Testing considerations are documented
## Validation
- [ ] Workflow passes JSON validation
- [ ] All required parameters are set
- [ ] Workflow structure is logical
- [ ] Migration matches source workflow functionality
## Credentials & Authentication
- [ ] All services requiring credentials are identified
- [ ] Credential types are correct for n8n
- [ ] OAuth requirements are noted
- [ ] API key requirements are noted
- [ ] Authentication differences from source are documented
## Testing Readiness
- [ ] Workflow can be imported into n8n
- [ ] Test data requirements are clear
- [ ] Expected outputs are defined
- [ ] Comparison approach with source is defined
- [ ] Initial monitoring plan is suggested
## Documentation
- [ ] User has import instructions
- [ ] Credential setup guidance provided
- [ ] Data mapping explanations provided
- [ ] Testing approach explained
- [ ] Platform differences highlighted
- [ ] Post-migration checklist provided

View File

@ -0,0 +1,354 @@
# Migrate Workflow to n8n - Workflow Instructions
```xml
<critical>The workflow execution engine is governed by: {project_root}/{bmad_folder}/core/tasks/workflow.xml</critical>
<critical>You MUST have already loaded and processed: {installed_path}/workflow.yaml</critical>
<critical>This workflow migrates automation workflows from other platforms to n8n.</critical>
<workflow>
<step n="0" goal="Contextual Analysis (Smart Elicitation)">
<critical>Before asking any questions, analyze what the user has already told you</critical>
<action>Review the user's initial request and conversation history</action>
<action>Extract any mentioned: source platform, workflow details, integrations, file paths</action>
<check if="ALL requirements are clear from context">
<action>Summarize your understanding</action>
<action>Skip directly to Step 2 (Research n8n Documentation for Migration)</action>
</check>
<check if="SOME requirements are clear">
<action>Note what you already know</action>
<action>Only ask about missing information in Step 1</action>
</check>
<check if="requirements are unclear or minimal">
<action>Proceed with full elicitation in Step 1</action>
</check>
</step>
<step n="1" goal="Gather Migration Requirements" elicit="true">
<critical>Understand the BUSINESS PURPOSE of the workflow being migrated, not just technical details</critical>
<action>Ask Question 1: "What does this workflow do? What problem does it solve?"</action>
<action>Encourage business context: "Describe the business process, not just the technical steps"</action>
<action>WAIT for user input</action>
<action>Store in {{business_purpose}}</action>
<action>Ask Question 2: "Which platform are you migrating from?"</action>
<action>Present numbered options:
1. Zapier - Migrate Zapier Zaps to n8n
2. Make (Integromat) - Migrate Make scenarios to n8n
3. HubSpot Workflows - Migrate HubSpot workflows to n8n
4. Microsoft Power Automate - Migrate Power Automate flows to n8n
5. IFTTT - Migrate IFTTT applets to n8n
6. Other - Specify another automation platform
</action>
<action>WAIT for user selection (1-6)</action>
<action>Store selection in {{source_platform}}</action>
<check if="selection is 6 (Other)">
<action>Ask: "Please specify the platform you're migrating from"</action>
<action>WAIT for user input</action>
<action>Store in {{source_platform}}</action>
</check>
<action>Ask Question 3: "Why are you migrating to n8n?"</action>
<action>Examples: "Cost savings", "More flexibility", "Self-hosting", "Better integrations"</action>
<action>WAIT for user input</action>
<action>Store in {{migration_reason}}</action>
<action>Ask Question 4: "How will you provide the workflow details?"</action>
<action>Present numbered options:
1. Describe the process - Explain what happens step by step
2. Provide export file - Upload/paste workflow export file
3. Provide screenshots - Share workflow screenshots
4. Combination - Multiple sources
</action>
<action>WAIT for user selection (1-4)</action>
<check if="selection is 1 or 4">
<action>Ask: "Describe the workflow step by step:"</action>
<action>- What triggers it?</action>
<action>- What data does it process?</action>
<action>- What actions does it take?</action>
<action>- What's the final outcome?</action>
<action>WAIT for user input</action>
<action>Store in {{workflow_description}}</action>
</check>
<check if="selection is 2 or 4">
<action>Ask: "Please provide the workflow export file path or paste the content"</action>
<action>WAIT for user input</action>
<action>Store in {{workflow_file}} or {{workflow_content}}</action>
</check>
<check if="selection is 3 or 4">
<action>Ask: "Please share the workflow screenshots and describe what each part does"</action>
<action>WAIT for user input</action>
<action>Store in {{workflow_screenshots}}</action>
</check>
<action>Ask Question 5: "What services/integrations does this workflow connect to?"</action>
<action>Ask: "List all services (e.g., Slack, Google Sheets, HubSpot, custom APIs, etc.)"</action>
<action>WAIT for user input</action>
<action>Store in {{integrations_used}}</action>
<action>Ask Question 6: "Are there any pain points or issues with the current workflow?"</action>
<action>Examples: "Slow execution", "Unreliable", "Missing features", "Hard to maintain"</action>
<action>Present numbered options:
1. No - Works fine, just migrating platform
2. Yes - Describe the issues
</action>
<action>WAIT for user selection (1-2)</action>
<check if="selection is 2">
<action>Ask: "What issues should we fix during migration?"</action>
<action>WAIT for user input</action>
<action>Store in {{issues_to_fix}}</action>
</check>
<action>Ask Question 6: "What should the migrated workflow be named?"</action>
<action>WAIT for user input</action>
<action>Store in {{workflow_name}}</action>
<action>Ask Question 7: "Where should the n8n workflow file be saved?"</action>
<action>Present numbered options:
1. Default location - workflows/[workflow-name].json
2. Custom path - Specify your own file path
3. Project root - Save in main project directory
</action>
<action>WAIT for user selection (1-3)</action>
<check if="selection is 2">
<action>Ask for specific path</action>
<action>WAIT for user input</action>
</check>
<action>Store final path in {{save_location}}</action>
</step>
<step n="2" goal="Research n8n Documentation for Migration">
<critical>Search for n8n documentation relevant to migration requirements</critical>
<action>Inform user: "Researching n8n documentation for migration from {{source_platform}}..."</action>
<action>Perform web search for:</action>
<action>1. n8n equivalents for {{source_platform}} features</action>
<action>2. Integration nodes: {{integrations_used}}</action>
<action>3. Migration best practices</action>
<action>4. Platform-specific considerations</action>
<action>Search queries to use:</action>
<action>- "n8n migrate from [source_platform]"</action>
<action>- "n8n [integration] node documentation"</action>
<action>- "n8n vs [source_platform] comparison"</action>
<action>- "n8n workflow migration guide"</action>
<action>Focus on official n8n documentation at docs.n8n.io</action>
<action>Store relevant migration patterns and node configurations</action>
</step>
<step n="3" goal="Verify Migration Approach">
<action>Summarize migration strategy based on documentation:</action>
<action>- n8n equivalents for {{source_platform}} features</action>
<action>- Required node types and configurations</action>
<action>- Data transformation needs</action>
<action>- Any migration challenges or limitations</action>
<action>Inform user: "Based on n8n documentation, I've identified the migration path from {{source_platform}}."</action>
</step>
<step n="4" goal="Load Platform Mappings">
<action>Load {{platform_mappings}} file</action>
<action>Extract mappings for {{source_platform}}</action>
<action>Identify equivalent n8n nodes for source platform components</action>
</step>
<step n="5" goal="Analyze Source Workflow">
<check if="{{workflow_file}} or {{workflow_content}} provided">
<action>Parse source workflow file/content</action>
<action>Extract workflow structure</action>
</check>
<action>Analyze workflow based on description and details:</action>
<action>1. Identify trigger type and configuration</action>
<action>2. List all actions/steps in order</action>
<action>3. Identify conditional logic (if/then branches)</action>
<action>4. Identify loops or iterations</action>
<action>5. Identify data transformations</action>
<action>6. Identify error handling</action>
<action>7. Map integrations to n8n nodes</action>
<action>Present analysis to user:</action>
<action>- Source trigger: [platform-specific trigger]</action>
<action>- n8n trigger: [mapped n8n node]</action>
<action>- Source actions: [list with platform names]</action>
<action>- n8n actions: [list with n8n node types]</action>
<action>- Logic: [conditional branches, loops]</action>
<action>- Transformations: [data mapping needs]</action>
</step>
<step n="6" goal="Plan n8n Workflow Structure">
<action>Load {{helpers}} for node creation guidelines</action>
<action>Load {{templates}} for reference</action>
<action>Design n8n workflow structure:</action>
<action>1. Map source trigger to n8n trigger node</action>
<action>2. Map each source action to n8n node(s)</action>
<action>3. Convert conditional logic to IF/Switch nodes</action>
<action>4. Convert loops to Split In Batches nodes</action>
<action>5. Add Set/Code nodes for data transformations</action>
<action>6. Plan node connections</action>
<action>7. Add error handling where needed</action>
<action>Present migration plan to user:</action>
<action>- n8n Trigger: [node type and configuration]</action>
<action>- n8n Nodes: [list with descriptions]</action>
<action>- Connections: [flow diagram]</action>
<action>- Data Mappings: [field mappings]</action>
<action>- Credentials Needed: [list of integrations requiring auth]</action>
<action>Ask: "Does this migration plan look correct?"</action>
<action>Present numbered options:
1. Yes - Proceed with migration
2. No - Adjust the plan
3. Add more details - Provide additional information
</action>
<action>WAIT for user selection (1-3)</action>
<check if="selection is 2 or 3">
<action>Ask: "What changes or additions are needed?"</action>
<action>WAIT for user input</action>
<action>Adjust plan based on feedback</action>
<action>Repeat this step</action>
</check>
</step>
<step n="7" goal="Build n8n Workflow">
<critical>Follow guidelines from {{helpers}} for proper node creation</critical>
<action>Initialize workflow structure:</action>
<substep>
{
"name": "{{workflow_name}}",
"nodes": [],
"connections": {},
"active": false,
"settings": {
"executionOrder": "v1"
},
"tags": [
{
"name": "migrated-from-{{source_platform}}"
}
]
}
</substep>
<action>Build nodes ONE at a time:</action>
<substep>For Each Mapped Node:
1. Generate unique node ID
2. Set node name (descriptive, unique)
3. Set node type from platform mappings
4. Set typeVersion (usually 1)
5. Calculate position (220px spacing)
6. Configure parameters based on source workflow
7. Map data fields from source to n8n format
8. Add credentials placeholder if needed
9. Set error handling if required
</substep>
<substep>For Data Transformations:
1. Identify field mappings needed
2. Create Set nodes for simple mappings
3. Create Code nodes for complex transformations
4. Use n8n expressions: ={{ $json.fieldName }}
5. Handle data type conversions
6. Handle date/time format differences
</substep>
<substep>For Conditional Logic:
1. Create IF nodes for if/then branches
2. Create Switch nodes for multiple conditions
3. Map source conditions to n8n condition format
4. Set up true/false branches (index 0/1)
</substep>
<substep>For Connections:
1. Connect trigger to first action
2. Connect actions in sequence
3. Connect conditional branches
4. Connect merge points
5. Validate all connections
</substep>
<action>Add migration notes as workflow tags</action>
<action>Validate all node IDs are unique</action>
<action>Validate all connections reference existing nodes</action>
</step>
<step n="8" goal="Add Migration Notes">
<action>Add comment nodes or documentation:</action>
<action>- Source platform: {{source_platform}}</action>
<action>- Migration date: {timestamp}</action>
<action>- Credentials to configure: [list]</action>
<action>- Testing notes: [important considerations]</action>
<action>- Platform-specific differences: [notes]</action>
</step>
<step n="9" goal="Save Migrated Workflow">
<action>Save workflow to {{save_location}}</action>
</step>
<step n="10" goal="Validate JSON Syntax">
<critical>NEVER delete the file if validation fails - always fix syntax errors</critical>
<action>Run: node -e "JSON.parse(require('fs').readFileSync('{{save_location}}', 'utf8')); console.log('✓ Valid JSON')"</action>
<check if="validation fails (exit code 1)">
<action>Read the error message carefully - it shows the syntax error and position</action>
<action>Open the file and navigate to the error location</action>
<action>Fix the syntax error (add missing comma, bracket, or quote as indicated)</action>
<action>Save the file</action>
<action>Re-run validation with the same command</action>
<action>Repeat until validation passes</action>
</check>
<action>Once validation passes, confirm with user: "Workflow migrated successfully to {{save_location}}"</action>
</step>
<step n="11" goal="Provide Migration Guidance">
<action>Provide post-migration instructions:</action>
<action>1. Import the JSON file into n8n</action>
<action>2. Configure credentials for these services: [list]</action>
<action>3. Review and update these data mappings: [list]</action>
<action>4. Test with sample data before activating</action>
<action>5. Compare outputs with original platform</action>
<action>6. Monitor initial executions closely</action>
<action>Highlight platform-specific differences:</action>
<action>- Authentication: [differences]</action>
<action>- Data formats: [differences]</action>
<action>- Scheduling: [differences]</action>
<action>- Error handling: [differences]</action>
<action>Ask: "Would you like help with any specific part of the migration?"</action>
<action>Present numbered options:
1. No - I'm ready to test
2. Yes - Explain credential setup
3. Yes - Explain data mappings
4. Yes - Explain testing approach
</action>
<action>WAIT for user selection (1-4)</action>
<check if="selection is 2, 3, or 4">
<action>Provide requested explanation</action>
</check>
</step>
<step n="12" goal="Validate Content">
<invoke-task>Validate against checklist at {{validation}} using {{bmad_folder}}/core/tasks/validate-workflow.xml</invoke-task>
</step>
</workflow>
```

View File

@ -0,0 +1,31 @@
name: migrate-workflow
description: "Migrate workflows from other platforms (Zapier, Make, HubSpot, etc.) to n8n"
author: "Saif"
# Workflow components
installed_path: "{project-root}/{bmad_folder}/autominator/workflows/migrate-workflow"
shared_path: "{project-root}/{bmad_folder}/autominator/workflows/_shared"
instructions: "{installed_path}/instructions.md"
validation: "{installed_path}/checklist.md"
# Shared resources
helpers: "{shared_path}/n8n-helpers.md"
templates: "{shared_path}/n8n-templates.yaml"
platform_mappings: "{shared_path}/platform-mappings.yaml"
# Variables
variables:
source_platform: "" # Will be elicited
workflow_description: "" # Will be elicited
workflow_file: "" # Will be elicited (optional)
workflow_content: "" # Will be elicited (optional)
integrations_used: [] # Will be elicited
trigger_type: "" # Will be elicited
complexity: "" # Will be elicited
save_location: "" # Will be elicited
workflow_name: "" # Will be elicited
default_output_file: "{project-root}/workflows/migrated-workflow-{timestamp}.json"
standalone: true
web_bundle: false

View File

@ -0,0 +1,90 @@
# Modify n8n Workflow - Validation Checklist
## Pre-Modification
- [ ] Original workflow file was successfully loaded
- [ ] Workflow JSON was valid before modifications
- [ ] Backup was created before making changes
- [ ] User requirements were clearly understood
## Workflow Structure
- [ ] Workflow maintains valid JSON structure
- [ ] Workflow name is preserved (unless intentionally changed)
- [ ] All nodes still have unique IDs
- [ ] All nodes still have unique names
- [ ] Workflow settings are preserved
## Node Modifications
- [ ] Added nodes have unique IDs
- [ ] Added nodes have unique names
- [ ] Added nodes have valid node types
- [ ] Added nodes have required parameters set
- [ ] Modified nodes preserve their IDs
- [ ] Modified nodes have valid parameter values
- [ ] Removed nodes are completely removed from nodes array
## Connections
- [ ] All connections reference existing nodes
- [ ] Connections to/from added nodes are properly configured
- [ ] Connections affected by removed nodes are updated
- [ ] No orphaned connections remain
- [ ] Connection indices are correct (0 for default, 0/1 for IF nodes)
- [ ] No circular dependencies (unless intentional)
## Node Positioning
- [ ] New nodes have valid positions
- [ ] New nodes don't overlap with existing nodes
- [ ] Node positions follow spacing guidelines (220px horizontal)
- [ ] Branch nodes have appropriate vertical spacing (±100px)
## Error Handling
- [ ] Error handling modifications are applied correctly
- [ ] Retry logic is properly configured if added
- [ ] continueOnFail settings are appropriate
- [ ] maxTries and waitBetweenTries are set if retries enabled
## Data Flow
- [ ] Data flow is maintained after modifications
- [ ] New transformations are properly configured
- [ ] Expressions use correct n8n syntax (={{ }})
- [ ] No data flow breaks introduced
## Integration Changes
- [ ] New integrations are properly configured
- [ ] Credential requirements are identified
- [ ] API configurations are correct
- [ ] Existing integrations still work
## Validation
- [ ] Modified workflow passes JSON validation
- [ ] All modifications match user requirements
- [ ] No unintended changes were made
- [ ] Workflow structure is still logical
## Backup & Recovery
- [ ] Backup file was created successfully
- [ ] Backup location was communicated to user
- [ ] Original workflow can be restored if needed
## Testing Readiness
- [ ] Modified workflow can be imported into n8n
- [ ] Changes are testable
- [ ] Expected behavior is clear
- [ ] Any new credentials needed are identified
## Documentation
- [ ] Changes made are summarized for user
- [ ] User understands what was modified
- [ ] Testing recommendations provided if needed
- [ ] Backup location shared with user

View File

@ -0,0 +1,336 @@
# Modify n8n Workflow - Workflow Instructions
```xml
<critical>The workflow execution engine is governed by: {project_root}/{bmad_folder}/core/tasks/workflow.xml</critical>
<critical>You MUST have already loaded and processed: {installed_path}/workflow.yaml</critical>
<critical>This workflow modifies an existing n8n workflow based on user requirements.</critical>
<workflow>
<step n="0" goal="Contextual Analysis (Smart Elicitation)">
<critical>Before asking any questions, analyze what the user has already told you</critical>
<action>Review the user's initial request and conversation history</action>
<action>Extract any mentioned: workflow file path, changes needed, specific nodes</action>
<check if="ALL requirements are clear from context">
<action>Summarize your understanding</action>
<action>Skip directly to Step 2 (Load Existing Workflow)</action>
</check>
<check if="SOME requirements are clear">
<action>Note what you already know</action>
<action>Only ask about missing information in Step 1</action>
</check>
<check if="requirements are unclear or minimal">
<action>Proceed with full elicitation in Step 1</action>
</check>
</step>
<step n="1" goal="Gather Requirements" elicit="true">
<critical>Understand WHY the user wants to modify the workflow, not just WHAT to change</critical>
<action>Ask Question 1: "Which workflow file do you want to modify?"</action>
<action>Present numbered options:
1. Provide file path - Specify exact path to workflow JSON
2. Search in workflows folder - List available workflows
3. Paste workflow JSON - Provide workflow content directly
</action>
<action>WAIT for user selection (1-3)</action>
<check if="selection is 1">
<action>Ask: "Please provide the file path to the workflow JSON"</action>
<action>WAIT for user input</action>
<action>Store in {{workflow_file}}</action>
</check>
<check if="selection is 2">
<action>List all .json files in workflows/ directory</action>
<action>Present as numbered list</action>
<action>WAIT for user selection</action>
<action>Store selected file path in {{workflow_file}}</action>
</check>
<check if="selection is 3">
<action>Ask: "Please paste the workflow JSON content"</action>
<action>WAIT for user input</action>
<action>Create temporary file with content</action>
<action>Store temp file path in {{workflow_file}}</action>
</check>
<action>Ask Question 2: "What problem are you trying to solve by modifying this workflow?"</action>
<action>Examples: "It's not handling errors properly", "Need to add Slack notifications", "Missing data validation"</action>
<action>WAIT for user input</action>
<action>Store in {{problem_to_solve}}</action>
<action>Ask Question 3: "What's currently not working or missing?"</action>
<action>Encourage specific details about the issue or gap</action>
<action>WAIT for user input</action>
<action>Store in {{current_issue}}</action>
<action>Ask Question 4: "What should the workflow do after these changes?"</action>
<action>Focus on the desired behavior and outcome</action>
<action>WAIT for user input</action>
<action>Store in {{desired_behavior}}</action>
<action>Ask Question 5: "Are there any specific nodes, integrations, or logic you want to change?"</action>
<action>Examples: "Add a Slack node after approval", "Change the IF condition to check status", "Remove the delay node"</action>
<action>WAIT for user input</action>
<action>Store in {{specific_changes}}</action>
<action>Summarize understanding:</action>
<action>- Problem: {{problem_to_solve}}</action>
<action>- Current Issue: {{current_issue}}</action>
<action>- Desired Behavior: {{desired_behavior}}</action>
<action>- Specific Changes: {{specific_changes}}</action>
<action>Ask: "Does this capture what you need?"</action>
<action>Present numbered options:
1. Yes - Proceed with modifications
2. No - Let me clarify
</action>
<action>WAIT for user selection (1-2)</action>
<check if="selection is 2">
<action>Ask: "What needs clarification?"</action>
<action>WAIT for user input</action>
<action>Update relevant variables</action>
<action>Repeat summary and confirmation</action>
</check>
</step>
<step n="2" goal="Load Existing Workflow">
<critical>Only load the workflow file when user provides it - never preload</critical>
<action>Read workflow file from {{workflow_file}}</action>
<action>Parse JSON content</action>
<action>Validate JSON structure</action>
<check if="JSON is invalid">
<action>Inform user: "The workflow file has invalid JSON syntax"</action>
<action>Show error details</action>
<action>Ask: "Would you like me to fix the JSON syntax first? (yes/no)"</action>
<action>WAIT for user response</action>
<check if="user says yes">
<action>Fix JSON syntax errors</action>
<action>Save corrected file</action>
<action>Proceed with loading</action>
</check>
<check if="user says no">
<action>Exit workflow with error</action>
</check>
</check>
<action>Extract workflow structure:</action>
<action>- Workflow name</action>
<action>- List of nodes (names, types, IDs)</action>
<action>- Connections map</action>
<action>- Current settings</action>
<action>Display workflow summary to user:</action>
<action>- Name: [workflow name]</action>
<action>- Nodes: [count] nodes</action>
<action>- Node list: [node names and types]</action>
<action>- Connections: [connection count]</action>
</step>
<step n="3" goal="Create Backup">
<action>Create backup of original workflow</action>
<action>Save backup to: {{workflow_file}}.backup-{timestamp}</action>
<action>Store true in {{backup_created}}</action>
<action>Inform user: "Backup created at {{workflow_file}}.backup-{timestamp}"</action>
</step>
<step n="4" goal="Research n8n Documentation for Modifications">
<critical>Search for n8n documentation relevant to the modifications needed</critical>
<action>Inform user: "Researching n8n documentation for your modifications..."</action>
<action>Perform web search based on modification needs:</action>
<action>- Problem to solve: {{problem_to_solve}}</action>
<action>- Specific changes: {{specific_changes}}</action>
<action>- Desired behavior: {{desired_behavior}}</action>
<action>Search queries to use:</action>
<action>- "n8n [specific feature] documentation"</action>
<action>- "n8n [node type] configuration"</action>
<action>- "n8n workflow modification best practices"</action>
<action>- "n8n [integration] setup"</action>
<action>Focus on official n8n documentation at docs.n8n.io</action>
<action>Store relevant node configurations and modification patterns</action>
</step>
<step n="5" goal="Verify Modification Approach">
<action>Summarize modification strategy based on documentation:</action>
<action>- How to implement {{desired_behavior}}</action>
<action>- Required node changes or additions</action>
<action>- Configuration updates needed</action>
<action>- Best practices for these modifications</action>
<action>Inform user: "Based on n8n documentation, I've identified how to implement your changes."</action>
</step>
<step n="6" goal="Plan Modifications">
<action>Load {{helpers}} for node creation guidelines</action>
<action>Analyze current workflow structure</action>
<action>Plan modifications based on requirements:</action>
<check if="adding nodes">
<action>1. Identify where new nodes should be inserted</action>
<action>2. Determine node types needed</action>
<action>3. Plan connections to/from new nodes</action>
<action>4. Calculate positions for new nodes</action>
</check>
<check if="modifying nodes">
<action>1. Identify nodes to modify by name or ID</action>
<action>2. Determine what parameters to change</action>
<action>3. Validate new parameter values</action>
</check>
<check if="removing nodes">
<action>1. Identify nodes to remove by name or ID</action>
<action>2. Identify connections that will be affected</action>
<action>3. Plan how to reconnect remaining nodes</action>
</check>
<check if="changing connections">
<action>1. Identify connections to modify</action>
<action>2. Validate new connection targets exist</action>
<action>3. Update connection indices if needed</action>
</check>
<action>Present modification plan to user:</action>
<action>- Changes to be made: [detailed list]</action>
<action>- Nodes affected: [list]</action>
<action>- New connections: [list]</action>
<action>- Removed connections: [list]</action>
<action>Ask: "Does this modification plan look correct?"</action>
<action>Present numbered options:
1. Yes - Proceed with modifications
2. No - Adjust the plan
3. Add more changes - Include additional modifications
</action>
<action>WAIT for user selection (1-3)</action>
<check if="selection is 2 or 3">
<action>Ask: "What changes or additions are needed?"</action>
<action>WAIT for user input</action>
<action>Adjust plan based on feedback</action>
<action>Repeat this step</action>
</check>
</step>
<step n="7" goal="Apply Modifications">
<critical>Follow guidelines from {{helpers}} for proper node creation</critical>
<action>Load current workflow JSON into memory</action>
<substep>If Adding Nodes:
1. Generate unique node IDs (check against existing IDs)
2. Create node objects with proper structure
3. Calculate positions (avoid overlaps with existing nodes)
4. Add nodes to workflow.nodes array
5. Create connections to/from new nodes
6. Update connections object
</substep>
<substep>If Modifying Nodes:
1. Find nodes by name or ID
2. Update parameters as specified
3. Preserve node ID and other unchanged properties
4. Validate new parameter values
5. Update node in workflow.nodes array
</substep>
<substep>If Removing Nodes:
1. Find nodes by name or ID
2. Remove from workflow.nodes array
3. Remove all connections to/from removed nodes
4. Update connections object
5. Reconnect remaining nodes if needed
</substep>
<substep>If Changing Connections:
1. Update connections object
2. Validate all referenced nodes exist
3. Ensure connection indices are correct
4. Remove orphaned connections
</substep>
<substep>If Updating Error Handling:
1. Find affected nodes
2. Add or update error handling properties:
- continueOnFail
- retryOnFail
- maxTries
- waitBetweenTries
3. Validate error handling configuration
</substep>
<action>Validate modified workflow:</action>
<action>- All node IDs are unique</action>
<action>- All node names are unique</action>
<action>- All connections reference existing nodes</action>
<action>- No orphaned nodes (except trigger)</action>
<action>- Node positions don't overlap</action>
</step>
<step n="8" goal="Save Modified Workflow">
<action>Save modified workflow to {{workflow_file}}</action>
<action>Preserve original file location</action>
</step>
<step n="9" goal="Validate JSON Syntax">
<critical>NEVER delete the file if validation fails - always fix syntax errors</critical>
<action>Run: node -e "JSON.parse(require('fs').readFileSync('{{workflow_file}}', 'utf8')); console.log('✓ Valid JSON')"</action>
<check if="validation fails (exit code 1)">
<action>Read the error message carefully - it shows the syntax error and position</action>
<action>Open the file and navigate to the error location</action>
<action>Fix the syntax error (add missing comma, bracket, or quote as indicated)</action>
<action>Save the file</action>
<action>Re-run validation with the same command</action>
<action>Repeat until validation passes</action>
</check>
<action>Once validation passes, confirm with user: "Workflow modified successfully at {{workflow_file}}"</action>
</step>
<step n="10" goal="Summarize Changes">
<action>Provide summary of changes made:</action>
<action>- Nodes added: [count and names]</action>
<action>- Nodes modified: [count and names]</action>
<action>- Nodes removed: [count and names]</action>
<action>- Connections changed: [count]</action>
<action>- Backup location: {{workflow_file}}.backup-{timestamp}</action>
<action>Ask: "Would you like to make additional changes?"</action>
<action>Present numbered options:
1. No - I'm done
2. Yes - Make more modifications
3. Revert - Restore from backup
</action>
<action>WAIT for user selection (1-3)</action>
<check if="selection is 2">
<action>Return to Step 1 with current workflow</action>
</check>
<check if="selection is 3">
<action>Restore workflow from backup</action>
<action>Confirm restoration to user</action>
</check>
</step>
<step n="11" goal="Validate Content">
<invoke-task>Validate against checklist at {{validation}} using {{bmad_folder}}/core/tasks/validate-workflow.xml</invoke-task>
</step>
</workflow>
```

View File

@ -0,0 +1,29 @@
name: modify-workflow
description: "Edit or update existing n8n workflow"
author: "Saif"
# Workflow components
installed_path: "{project-root}/{bmad_folder}/autominator/workflows/modify-workflow"
shared_path: "{project-root}/{bmad_folder}/autominator/workflows/_shared"
instructions: "{installed_path}/instructions.md"
validation: "{installed_path}/checklist.md"
# Shared resources
helpers: "{shared_path}/n8n-helpers.md"
templates: "{shared_path}/n8n-templates.yaml"
platform_mappings: "{shared_path}/platform-mappings.yaml"
# Variables
variables:
workflow_file: "" # Will be elicited
modification_type: "" # Will be elicited
changes_description: "" # Will be elicited
nodes_to_add: [] # Will be elicited
nodes_to_modify: [] # Will be elicited
nodes_to_remove: [] # Will be elicited
backup_created: false # Will be set
default_output_file: "" # Will use existing file location
standalone: true
web_bundle: false

View File

@ -0,0 +1,130 @@
# Optimize n8n Workflow - Validation Checklist
## Pre-Optimization
- [ ] Original workflow was successfully loaded
- [ ] Workflow JSON was valid before optimization
- [ ] Optimization focus areas were identified
- [ ] Backup was created before making changes
- [ ] User requirements were clearly understood
## Analysis Completeness
- [ ] Performance analysis was conducted
- [ ] Error handling was reviewed
- [ ] Code quality was assessed
- [ ] Structure was evaluated
- [ ] Best practices were checked
- [ ] Security was reviewed
- [ ] All issues were documented
## Recommendations Quality
- [ ] Recommendations are specific and actionable
- [ ] Recommendations are prioritized correctly
- [ ] Impact of each recommendation is clear
- [ ] Implementation steps are provided
- [ ] Expected improvements are quantified
- [ ] No breaking changes are recommended
## Performance Optimizations
- [ ] Unnecessary nodes were identified/removed
- [ ] Data transformations were optimized
- [ ] Batch processing opportunities were identified
- [ ] Redundant API calls were consolidated
- [ ] Parallel execution opportunities were identified
- [ ] Node execution order was optimized
## Error Handling Improvements
- [ ] Critical nodes have retry logic
- [ ] continueOnFail is set appropriately
- [ ] Error workflows are configured where needed
- [ ] Timeout configurations are appropriate
- [ ] Error notifications are set up
- [ ] Error handling doesn't mask real issues
## Code Quality Improvements
- [ ] Set nodes are properly configured
- [ ] Code nodes are optimized
- [ ] Expressions use correct syntax
- [ ] Data types are handled correctly
- [ ] Hardcoded values are replaced with variables
- [ ] Node names are descriptive and consistent
## Structure Improvements
- [ ] Node positions are logical and organized
- [ ] Complex branches are simplified where possible
- [ ] Duplicate logic is eliminated
- [ ] Merge points are optimized
- [ ] Connection patterns are clean
- [ ] Workflow flow is easy to follow
## Best Practices Applied
- [ ] Credentials are used correctly
- [ ] Security issues are addressed
- [ ] Node types are appropriate
- [ ] Node versions are up to date
- [ ] Data handling follows best practices
- [ ] Workflow settings are optimal
## Security Improvements
- [ ] No credentials are exposed
- [ ] Sensitive data is handled properly
- [ ] No hardcoded secrets remain
- [ ] Authentication is properly configured
- [ ] Data is sanitized where needed
- [ ] Security best practices are followed
## Workflow Integrity
- [ ] All node IDs remain unique
- [ ] All node names remain unique
- [ ] All connections are valid
- [ ] No functionality is lost
- [ ] Workflow still achieves original purpose
- [ ] No breaking changes introduced
## Validation
- [ ] Optimized workflow passes JSON validation
- [ ] All optimizations were applied correctly
- [ ] No unintended changes were made
- [ ] Workflow structure is still logical
- [ ] All improvements are documented
## Backup & Recovery
- [ ] Backup file was created successfully
- [ ] Backup location was communicated to user
- [ ] Original workflow can be restored if needed
## Testing Readiness
- [ ] Optimized workflow can be imported into n8n
- [ ] Test scenarios are identified
- [ ] Expected improvements are measurable
- [ ] Comparison approach is defined
- [ ] Monitoring plan is suggested
## Documentation
- [ ] Analysis report is comprehensive
- [ ] All findings are documented
- [ ] Recommendations are clearly explained
- [ ] Expected improvements are quantified
- [ ] Testing recommendations are provided
- [ ] User understands all changes made
## Expected Improvements
- [ ] Performance improvements are quantified
- [ ] Reliability improvements are identified
- [ ] Maintainability improvements are clear
- [ ] Security improvements are documented
- [ ] Cost savings are estimated (if applicable)

View File

@ -0,0 +1,475 @@
# Optimize n8n Workflow - Workflow Instructions
```xml
<critical>The workflow execution engine is governed by: {project_root}/{bmad_folder}/core/tasks/workflow.xml</critical>
<critical>You MUST have already loaded and processed: {installed_path}/workflow.yaml</critical>
<critical>This workflow analyzes and optimizes existing n8n workflows for performance and best practices.</critical>
<workflow>
<step n="0" goal="Contextual Analysis (Smart Elicitation)">
<critical>Before asking any questions, analyze what the user has already told you</critical>
<action>Review the user's initial request and conversation history</action>
<action>Extract any mentioned: workflow file path, performance issues, optimization goals</action>
<check if="ALL requirements are clear from context">
<action>Summarize your understanding</action>
<action>Skip directly to Step 2 (Load Workflow)</action>
</check>
<check if="SOME requirements are clear">
<action>Note what you already know</action>
<action>Only ask about missing information in Step 1</action>
</check>
<check if="requirements are unclear or minimal">
<action>Proceed with full elicitation in Step 1</action>
</check>
</step>
<step n="1" goal="Gather Optimization Requirements" elicit="true">
<critical>Understand the REAL PROBLEMS the user is experiencing, not just generic optimization goals</critical>
<action>Ask Question 1: "Which workflow do you want to optimize?"</action>
<action>Present numbered options:
1. Provide file path - Specify exact path to workflow JSON
2. Search in workflows folder - List available workflows
3. Paste workflow JSON - Provide workflow content directly
</action>
<action>WAIT for user selection (1-3)</action>
<check if="selection is 1">
<action>Ask: "Please provide the file path to the workflow JSON"</action>
<action>WAIT for user input</action>
<action>Store in {{workflow_file}}</action>
</check>
<check if="selection is 2">
<action>List all .json files in workflows/ directory</action>
<action>Present as numbered list</action>
<action>WAIT for user selection</action>
<action>Store selected file path in {{workflow_file}}</action>
</check>
<check if="selection is 3">
<action>Ask: "Please paste the workflow JSON content"</action>
<action>WAIT for user input</action>
<action>Create temporary file with content</action>
<action>Store temp file path in {{workflow_file}}</action>
</check>
<action>Ask Question 2: "What problems are you experiencing with this workflow?"</action>
<action>Examples: "Takes too long to run", "Fails frequently", "Hard to understand", "Doesn't handle errors well"</action>
<action>WAIT for user input</action>
<action>Store in {{problems_experienced}}</action>
<action>Ask Question 3: "What's the business impact of these problems?"</action>
<action>Examples: "Delays customer responses", "Wastes team time", "Causes data issues", "Costs money"</action>
<action>WAIT for user input</action>
<action>Store in {{business_impact}}</action>
<action>Ask Question 4: "What would 'better' look like for this workflow?"</action>
<action>Focus on desired outcomes: "Faster execution", "More reliable", "Easier to maintain", "Better error recovery"</action>
<action>WAIT for user input</action>
<action>Store in {{desired_improvements}}</action>
<action>Ask Question 5: "Are there specific areas you want me to focus on?"</action>
<action>Present numbered options (can select multiple):
1. Performance - Speed and efficiency
2. Reliability - Error handling and retries
3. Maintainability - Code quality and structure
4. Security - Credential and data handling
5. All - Comprehensive review
6. Let you decide - Analyze and recommend
</action>
<action>WAIT for user selection (1-6 or multiple)</action>
<action>Store selections in {{optimization_focus}}</action>
<action>Summarize understanding:</action>
<action>- Problems: {{problems_experienced}}</action>
<action>- Business Impact: {{business_impact}}</action>
<action>- Desired Improvements: {{desired_improvements}}</action>
<action>- Focus Areas: {{optimization_focus}}</action>
<action>Ask: "Does this capture your optimization needs?"</action>
<action>Present numbered options:
1. Yes - Proceed with analysis
2. No - Let me clarify
</action>
<action>WAIT for user selection (1-2)</action>
<check if="selection is 2">
<action>Ask: "What needs clarification?"</action>
<action>WAIT for user input</action>
<action>Update relevant variables</action>
<action>Repeat summary and confirmation</action>
</check>
</step>
<step n="2" goal="Load Workflow">
<critical>Only load the workflow file when user provides it - never preload</critical>
<action>Read workflow file from {{workflow_file}}</action>
<action>Parse JSON content</action>
<action>Validate JSON structure</action>
<check if="JSON is invalid">
<action>Inform user: "The workflow file has invalid JSON syntax"</action>
<action>Show error details</action>
<action>Ask: "Would you like me to fix the JSON syntax first? (yes/no)"</action>
<action>WAIT for user response</action>
<check if="user says yes">
<action>Fix JSON syntax errors</action>
<action>Save corrected file</action>
<action>Proceed with loading</action>
</check>
<check if="user says no">
<action>Exit workflow with error</action>
</check>
</check>
<action>Extract workflow structure:</action>
<action>- Workflow name and settings</action>
<action>- Node count and types</action>
<action>- Connection patterns</action>
<action>- Error handling configuration</action>
<action>- Credential usage</action>
<action>Display workflow summary to user:</action>
<action>- Name: [workflow name]</action>
<action>- Nodes: [count] nodes</action>
<action>- Complexity: [simple/medium/complex]</action>
<action>- Integrations: [list of services]</action>
</step>
<step n="3" goal="Research n8n Best Practices and Optimization">
<critical>Search for n8n documentation on optimization and best practices</critical>
<action>Inform user: "Researching n8n best practices and optimization techniques..."</action>
<action>Perform web search for:</action>
<action>1. n8n performance optimization</action>
<action>2. n8n error handling best practices</action>
<action>3. n8n workflow structure patterns</action>
<action>4. n8n security best practices</action>
<action>5. Solutions for: {{problems_experienced}}</action>
<action>Search queries to use:</action>
<action>- "n8n workflow optimization best practices"</action>
<action>- "n8n performance tuning"</action>
<action>- "n8n error handling patterns"</action>
<action>- "n8n workflow security"</action>
<action>- "n8n [specific problem] solution"</action>
<action>Focus on official n8n documentation at docs.n8n.io</action>
<action>Store relevant optimization techniques and best practices</action>
</step>
<step n="4" goal="Verify Optimization Strategy">
<action>Summarize optimization approach based on documentation:</action>
<action>- Solutions for {{problems_experienced}}</action>
<action>- Best practices to apply</action>
<action>- Performance improvements available</action>
<action>- Expected impact on {{business_impact}}</action>
<action>Inform user: "Based on n8n best practices, I've identified optimization opportunities."</action>
</step>
<step n="5" goal="Analyze Workflow">
<action>Load {{helpers}} for best practices reference</action>
<action>Perform comprehensive analysis based on {{optimization_focus}}:</action>
<substep>Performance Analysis:
- Check for unnecessary nodes
- Identify inefficient data transformations
- Look for missing batch processing opportunities
- Check for redundant API calls
- Analyze node execution order
- Identify parallel execution opportunities
</substep>
<substep>Error Handling Analysis:
- Check if critical nodes have retry logic
- Verify continueOnFail settings
- Look for missing error workflows
- Check timeout configurations
- Verify error notification setup
</substep>
<substep>Code Quality Analysis:
- Review Set node configurations
- Review Code node implementations
- Check expression syntax and efficiency
- Verify data type handling
- Check for hardcoded values
- Review node naming conventions
</substep>
<substep>Structure Analysis:
- Check node positioning and layout
- Verify logical flow organization
- Look for overly complex branches
- Check for duplicate logic
- Verify proper use of merge nodes
- Check connection patterns
</substep>
<substep>Best Practices Analysis:
- Verify proper credential usage
- Check for security issues
- Verify proper use of node types
- Check for deprecated node versions
- Verify proper data handling
- Check workflow settings
</substep>
<substep>Security Analysis:
- Check credential exposure
- Verify sensitive data handling
- Check for hardcoded secrets
- Verify proper authentication
- Check data sanitization
</substep>
<action>Store all findings in {{issues_found}}</action>
</step>
<step n="6" goal="Generate Recommendations">
<action>For each issue found, generate specific recommendations:</action>
<action>Categorize recommendations by priority:</action>
<action>- Critical: Security issues, major performance problems</action>
<action>- High: Error handling gaps, significant inefficiencies</action>
<action>- Medium: Code quality improvements, minor optimizations</action>
<action>- Low: Cosmetic improvements, nice-to-haves</action>
<action>For each recommendation, provide:</action>
<action>1. Issue description</action>
<action>2. Impact explanation</action>
<action>3. Specific solution</action>
<action>4. Implementation steps</action>
<action>5. Expected improvement</action>
<action>Store recommendations in {{recommendations}}</action>
</step>
<step n="7" goal="Present Analysis Report" elicit="true">
<action>Present comprehensive optimization report:</action>
<action>## Workflow Analysis Report</action>
<action>Workflow: {{workflow_name}}</action>
<action>Analysis Date: {timestamp}</action>
<action>Optimization Focus: {{optimization_focus}}</action>
<action>### Summary</action>
<action>- Total Issues Found: [count]</action>
<action>- Critical: [count]</action>
<action>- High Priority: [count]</action>
<action>- Medium Priority: [count]</action>
<action>- Low Priority: [count]</action>
<action>### Detailed Findings</action>
<action>Present each issue with:</action>
<action>- Priority level</action>
<action>- Issue description</action>
<action>- Current state</action>
<action>- Recommended solution</action>
<action>- Expected impact</action>
<action>### Performance Opportunities</action>
<action>List specific performance improvements with estimated impact</action>
<action>### Best Practice Violations</action>
<action>List n8n best practices not being followed</action>
<action>Ask: "Would you like me to apply these optimizations?"</action>
<action>Present numbered options:
1. Yes - Apply all recommendations
2. Yes - Apply only critical and high priority
3. Yes - Let me choose which to apply
4. No - Just provide the report
5. Explain more - I need more details first
</action>
<action>WAIT for user selection (1-5)</action>
<check if="selection is 5">
<action>Ask: "Which recommendations would you like explained?"</action>
<action>WAIT for user input</action>
<action>Provide detailed explanation</action>
<action>Repeat this step</action>
</check>
<check if="selection is 3">
<action>Present recommendations as numbered list</action>
<action>Ask: "Select recommendations to apply (comma-separated numbers)"</action>
<action>WAIT for user input</action>
<action>Store selected recommendations</action>
</check>
<check if="selection is 1, 2, or 3">
<action>Store true in {{apply_changes}}</action>
<action>Proceed to Step 8</action>
</check>
<check if="selection is 4">
<action>Store false in {{apply_changes}}</action>
<action>Skip to Step 11 (provide report only)</action>
</check>
</step>
<step n="8" goal="Create Backup">
<check if="{{apply_changes}} is true">
<action>Create backup of original workflow</action>
<action>Save backup to: {{workflow_file}}.backup-{timestamp}</action>
<action>Store true in {{backup_created}}</action>
<action>Inform user: "Backup created at {{workflow_file}}.backup-{timestamp}"</action>
</check>
</step>
<step n="9" goal="Apply Optimizations">
<critical>Follow guidelines from {{helpers}} for proper node configuration</critical>
<action>Load current workflow JSON into memory</action>
<action>Apply each selected recommendation:</action>
<substep>Performance Optimizations:
- Remove unnecessary nodes
- Optimize data transformations
- Add batch processing where applicable
- Consolidate redundant API calls
- Optimize node execution order
- Add parallel execution where possible
</substep>
<substep>Error Handling Improvements:
- Add retry logic to critical nodes
- Set appropriate continueOnFail values
- Add error workflows if needed
- Configure timeouts
- Add error notifications
</substep>
<substep>Code Quality Improvements:
- Refactor Set node configurations
- Optimize Code node implementations
- Improve expression syntax
- Fix data type handling
- Replace hardcoded values with variables
- Improve node naming
</substep>
<substep>Structure Improvements:
- Reorganize node positions
- Simplify complex branches
- Remove duplicate logic
- Optimize merge points
- Improve connection patterns
</substep>
<substep>Best Practice Applications:
- Fix credential usage
- Address security issues
- Update deprecated nodes
- Improve data handling
- Update workflow settings
</substep>
<action>Validate optimized workflow:</action>
<action>- All node IDs remain unique</action>
<action>- All connections are valid</action>
<action>- No functionality is lost</action>
<action>- All improvements are applied</action>
</step>
<step n="10" goal="Save Optimized Workflow">
<action>Save optimized workflow to {{workflow_file}}</action>
</step>
<step n="11" goal="Validate JSON Syntax">
<check if="{{apply_changes}} is true">
<critical>NEVER delete the file if validation fails - always fix syntax errors</critical>
<action>Run: node -e "JSON.parse(require('fs').readFileSync('{{workflow_file}}', 'utf8')); console.log('✓ Valid JSON')"</action>
<check if="validation fails (exit code 1)">
<action>Read the error message carefully - it shows the syntax error and position</action>
<action>Open the file and navigate to the error location</action>
<action>Fix the syntax error (add missing comma, bracket, or quote as indicated)</action>
<action>Save the file</action>
<action>Re-run validation with the same command</action>
<action>Repeat until validation passes</action>
</check>
<action>Once validation passes, confirm with user: "Workflow optimized successfully at {{workflow_file}}"</action>
</check>
</step>
<step n="12" goal="Provide Optimization Summary">
<action>Provide comprehensive summary:</action>
<check if="{{apply_changes}} is true">
<action>### Optimizations Applied</action>
<action>- Total changes: [count]</action>
<action>- Performance improvements: [list]</action>
<action>- Error handling added: [list]</action>
<action>- Code quality fixes: [list]</action>
<action>- Structure improvements: [list]</action>
<action>- Best practices applied: [list]</action>
<action>- Backup location: {{workflow_file}}.backup-{timestamp}</action>
<action>### Expected Improvements</action>
<action>- Execution speed: [estimated improvement]</action>
<action>- Reliability: [improvements]</action>
<action>- Maintainability: [improvements]</action>
<action>- Security: [improvements]</action>
<action>### Testing Recommendations</action>
<action>1. Import optimized workflow into n8n</action>
<action>2. Test with sample data</action>
<action>3. Compare execution times with original</action>
<action>4. Verify all functionality works correctly</action>
<action>5. Monitor error rates</action>
</check>
<check if="{{apply_changes}} is false">
<action>### Optimization Report</action>
<action>Report saved with all recommendations</action>
<action>No changes applied to workflow</action>
<action>Review recommendations and apply manually if desired</action>
</check>
<action>Ask: "Would you like additional help?"</action>
<action>Present numbered options:
1. No - I'm done
2. Yes - Explain specific optimizations
3. Yes - Optimize another workflow
4. Revert - Restore from backup
</action>
<action>WAIT for user selection (1-4)</action>
<check if="selection is 2">
<action>Ask: "Which optimization would you like explained?"</action>
<action>WAIT for user input</action>
<action>Provide detailed explanation</action>
</check>
<check if="selection is 3">
<action>Return to Step 1 for new workflow</action>
</check>
<check if="selection is 4">
<action>Restore workflow from backup</action>
<action>Confirm restoration to user</action>
</check>
</step>
<step n="13" goal="Validate Content">
<invoke-task>Validate against checklist at {{validation}} using {{bmad_folder}}/core/tasks/validate-workflow.xml</invoke-task>
</step>
</workflow>
```

View File

@ -0,0 +1,28 @@
name: optimize-workflow
description: "Review and improve existing n8n workflows for performance and best practices"
author: "Saif"
# Workflow components
installed_path: "{project-root}/{bmad_folder}/autominator/workflows/optimize-workflow"
shared_path: "{project-root}/{bmad_folder}/autominator/workflows/_shared"
instructions: "{installed_path}/instructions.md"
validation: "{installed_path}/checklist.md"
# Shared resources
helpers: "{shared_path}/n8n-helpers.md"
templates: "{shared_path}/n8n-templates.yaml"
platform_mappings: "{shared_path}/platform-mappings.yaml"
# Variables
variables:
workflow_file: "" # Will be elicited
optimization_focus: [] # Will be elicited
issues_found: [] # Will be identified
recommendations: [] # Will be generated
apply_changes: false # Will be elicited
backup_created: false # Will be set
default_output_file: "" # Will use existing file location
standalone: true
web_bundle: false

View File

@ -69,7 +69,7 @@ workflow-folder/
Standard variables in step files:
```yaml
workflow_path: '{project-root}/{bmad_folder}/bmb/reference/workflows/[workflow-name]'
workflow_path: '{project-root}/{*bmad_folder*}/bmb/reference/workflows/[workflow-name]'
thisStepFile: '{workflow_path}/steps/step-[N]-[name].md'
nextStepFile: '{workflow_path}/steps/step-[N+1]-[name].md'
workflowFile: '{workflow_path}/workflow.md'

View File

@ -13,7 +13,7 @@ description: 'Initialize the [workflow-type] workflow by detecting continuation
<!-- Path Definitions -->
workflow_path: '{project-root}/{bmad_folder}/[module-path]/workflows/[workflow-name]'
workflow*path: '{project-root}/{\_bmad_folder*}/[module-path]/workflows/[workflow-name]'
# File References (all use {variable} format in file)

View File

@ -13,7 +13,7 @@ description: 'Handle workflow continuation from previous session'
<!-- Path Definitions -->
workflow_path: '{project-root}/{bmad_folder}/[module-path]/workflows/[workflow-name]'
workflow*path: '{project-root}/{\_bmad_folder*}/[module-path]/workflows/[workflow-name]'
# File References (all use {variable} format in file)

View File

@ -3,7 +3,7 @@ name: "step-{{stepNumber}}-{{stepName}}"
description: "{{stepDescription}}"
# Path Definitions
workflow_path: "{project-root}/{bmad_folder}/{{targetModule}}/workflows/{{workflowName}}"
workflow_path: "{project-root}/{*bmad_folder*}/{{targetModule}}/workflows/{{workflowName}}"
# File References
thisStepFile: "{workflow_path}/steps/step-{{stepNumber}}-{{stepName}}.md"
@ -15,9 +15,9 @@ workflowFile: "{workflow_path}/workflow.md"
outputFile: "{output_folder}/{{outputFileName}}-{project_name}.md"
{{/hasOutput}}
# Task References
advancedElicitationTask: "{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml"
partyModeWorkflow: "{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md"
# Task References (list only if used in THIS step file instance and only the ones used, there might be others)
advancedElicitationTask: "{project-root}/{*bmad_folder*}/core/tasks/advanced-elicitation.xml"
partyModeWorkflow: "{project-root}/{*bmad_folder*}/core/workflows/party-mode/workflow.md"
{{#hasTemplates}}
# Template References

View File

@ -11,7 +11,7 @@ description: '[Brief description of what this step accomplishes]'
<!-- Path Definitions -->
workflow_path: '{project-root}/{bmad_folder}/bmb/reference/workflows/[workflow-name]' # the folder the workflow.md file is in
workflow*path: '{project-root}/{\_bmad_folder*}/bmb/reference/workflows/[workflow-name]' # the folder the workflow.md file is in
# File References (all use {variable} format in file)
@ -23,8 +23,8 @@ outputFile: '{output_folder}/[output-file-name]-{project_name}.md'
# Task References (IF THE workflow uses and it makes sense in this step to have these )
advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
advancedElicitationTask: '{project-root}/{_bmad_folder_}/core/tasks/advanced-elicitation.xml'
partyModeWorkflow: '{project-root}/{_bmad_folder_}/core/workflows/party-mode/workflow.md'
# Template References (if this step uses a specific templates)

View File

@ -53,7 +53,7 @@ web_bundle: [true/false] # Set to true for inclusion in web bundle builds
### 1. Module Configuration Loading
Load and read full config from {project-root}/{bmad_folder}/[MODULE FOLDER]/config.yaml and resolve:
Load and read full config from {project-root}/{_bmad_folder_}/[MODULE FOLDER]/config.yaml and resolve:
- `project_name`, `output_folder`, `user_name`, `communication_language`, `document_output_language`, [MODULE VARS]

View File

@ -49,7 +49,7 @@ This uses **step-file architecture** for disciplined execution:
### 1. Configuration Loading
Load and read full config from {project-root}/{bmad_folder}/{{targetModule}}/config.yaml and resolve:
Load and read full config from {project-root}/{_bmad_folder_}/{{targetModule}}/config.yaml and resolve:
- `project_name`, `output_folder`, `user_name`, `communication_language`, `document_output_language`

View File

@ -1,5 +1,5 @@
---
name: Create Agent
name: create-agent
description: Interactive workflow to build BMAD Core compliant agents with optional brainstorming, persona development, and command structure
web_bundle: true
---

View File

@ -1,6 +1,6 @@
---
name: 'step-01-init'
description: 'Initialize workflow creation session by detecting continuation state and setting up project'
description: 'Initialize workflow creation session by gathering project information and setting up unique workflow folder'
# Path Definitions
workflow_path: '{project-root}/{bmad_folder}/bmb/workflows/create-workflow'
@ -9,24 +9,19 @@ workflow_path: '{project-root}/{bmad_folder}/bmb/workflows/create-workflow'
thisStepFile: '{workflow_path}/steps/step-01-init.md'
nextStepFile: '{workflow_path}/steps/step-02-gather.md'
workflowFile: '{workflow_path}/workflow.md'
# Output files for workflow creation process
workflowPlanFile: '{output_folder}/workflow-plan-{new_workflow_name}.md'
targetWorkflowPath: '{custom_workflow_location}/{new_workflow_name}'
# Task References
advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
# Template References
projectInfoTemplate: '{workflow_path}/templates/project-info.md'
workflowPlanTemplate: '{workflow_path}/templates/workflow-plan.md'
# No workflow plan template needed - will create plan file directly
---
# Step 1: Workflow Creation Initialization
## STEP GOAL:
To initialize the workflow creation process by detecting continuation state, understanding project context, and preparing for collaborative workflow design.
To initialize the workflow creation process by understanding project context, determining a unique workflow name, and preparing for collaborative workflow design.
## MANDATORY EXECUTION RULES (READ FIRST):
@ -50,7 +45,7 @@ To initialize the workflow creation process by detecting continuation state, und
- 🎯 Focus ONLY on initialization and project understanding
- 🚫 FORBIDDEN to start designing workflow steps in this step
- 💬 Ask questions conversationally to understand context
- 🚪 DETECT existing workflow state and handle continuation properly
- 🚪 ENSURE unique workflow naming to avoid conflicts
## EXECUTION PROTOCOLS:
@ -68,35 +63,7 @@ To initialize the workflow creation process by detecting continuation state, und
## INITIALIZATION SEQUENCE:
### 1. Check for Existing Workflow Creation
First, check if there's already a workflow folder with the proposed name:
- Look for folder at `{custom_workflow_location}/{new_workflow_name}/`
- If exists, check if it contains a workflow.md file
- If not exists, this is a fresh workflow creation session
### 2. Handle Continuation (If Workflow Exists)
If the workflow folder exists and has been worked on:
- **STOP here** and continue with step 4 (Welcome Back)
- Do not proceed with fresh initialization
- Let step 4 handle the continuation logic
### 3. Handle Completed Workflow
If the workflow folder exists AND is complete:
- Ask user: "I found an existing workflow '{new_workflow_name}' from [date]. Would you like to:
1. Create a new workflow with a different name
2. Review or modify the existing workflow"
- If option 1: Get a new workflow name
- If option 2: Load step 5 (Review)
### 4. Fresh Workflow Setup (If No Workflow)
#### A. Project Discovery
### 1. Project Discovery
Welcome the user and understand their needs:
"Welcome! I'm excited to help you create a new workflow. Let's start by understanding what you want to build."
@ -107,33 +74,55 @@ Ask conversationally:
- What problem will this workflow solve?
- Who will use this workflow?
- What module will it belong to (bmb, bmm, cis, custom, stand-alone)?
- What would you like to name this workflow folder? (kebab-case, e.g., "user-story-generator")
#### B. Create Workflow Plan Document
Also, Ask / suggest a workflow name / folder: (kebab-case, e.g., "user-story-generator")
Create the workflow plan document at `{workflowPlanFile}` using the workflow plan template `{workflowPlanTemplate}`.
Initialize frontmatter with:
### 2. Ensure Unique Workflow Name
```yaml
After getting the workflow name:
**Check for existing workflows:**
- Look for folder at `{custom_workflow_location}/{new_workflow_name}/`
- If it exists, inform the user and suggest or get from them a unique name or postfix
**Example alternatives:**
- Original: "user-story-generator"
- Alternatives: "user-story-creator", "user-story-generator-2025", "user-story-generator-enhanced"
**Loop until we have a unique name that doesn't conflict.**
### 3. Determine Target Location
Based on the module selection, confirm the target location:
- For bmb module: `{custom_workflow_location}` (defaults to `{bmad_folder}/custom/src/workflows`)
- For other modules: Check their install-config.yaml for custom workflow locations
- Confirm the exact folder path where the workflow will be created
- Store the confirmed path as `{targetWorkflowPath}`
### 4. Create Workflow Plan Document
Create the workflow plan document at `{workflowPlanFile}` with the following initial content:
```markdown
---
workflowName: ''
targetModule: ''
workflowType: ''
flowPattern: ''
date: [current date]
user_name: { user_name }
stepsCompleted: [1]
lastStep: 'init'
---
# Workflow Creation Plan: {new_workflow_name}
## Initial Project Context
- **Module:** [module from user]
- **Target Location:** {targetWorkflowPath}
- **Created:** [current date]
```
This plan will capture all requirements and design details before building the actual workflow.
### 5. Welcome Message
"Great! I'm ready to help you create a structured workflow using our step-based architecture. We'll work together to design a workflow that's collaborative, maintainable, and follows best practices."
### 6. Present MENU OPTIONS
### 5. Present MENU OPTIONS
Display: **Proceeding to requirements gathering...**
@ -145,7 +134,7 @@ Display: **Proceeding to requirements gathering...**
#### Menu Handling Logic:
- After setup completion, immediately load, read entire file, then execute `{workflow_path}/step-02-gather.md` to begin requirements gathering
- After setup completion and the workflow folder with the workflow plan file created already, only then immediately load, read entire file, and then execute `{workflow_path}/steps/step-02-gather.md` to begin requirements gathering
---

View File

@ -7,18 +7,16 @@ workflow_path: '{project-root}/{bmad_folder}/bmb/workflows/create-workflow'
# File References
thisStepFile: '{workflow_path}/steps/step-02-gather.md'
nextStepFile: '{workflow_path}/steps/step-03-tools-overview.md'
workflowFile: '{workflow_path}/workflow.md'
nextStepFile: '{workflow_path}/steps/step-03-tools-configuration.md'
# Output files for workflow creation process
workflowPlanFile: '{output_folder}/workflow-plan-{new_workflow_name}.md'
targetWorkflowPath: '{custom_workflow_location}/{new_workflow_name}'
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
# Task References
advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
# Template References
requirementsTemplate: '{workflow_path}/templates/requirements-section.md'
# No template needed - will append requirements directly to workflow plan
---
# Step 2: Requirements Gathering
@ -156,25 +154,7 @@ Define what the workflow produces:
- Should outputs be saved automatically?
- What format should outputs be in?
### 8. Target Location and Module Configuration
Determine where the workflow will be created:
- For bmb module: Workflows go to `{custom_workflow_location}` (defaults to `{bmad_folder}/custom/src/workflows`)
- For other modules: Check their install-config.yaml for custom workflow locations
- Confirm the exact folder path where the workflow will be created
- Ensure the folder name doesn't conflict with existing workflows
### 9. Technical Constraints
Discuss technical requirements:
- Any specific tools or dependencies needed?
- Does it need to integrate with other systems?
- Any performance considerations?
- Should it be standalone or callable by other workflows?
### 10. Success Criteria
### 8. Success Criteria
Define what makes the workflow successful:
@ -183,13 +163,11 @@ Define what makes the workflow successful:
- Are there measurable outcomes?
- What would make a user satisfied with the result?
## STORE REQUIREMENTS:
#### STORE REQUIREMENTS:
After collecting all requirements, append them to {workflowPlanFile} using {requirementsTemplate}:
After collecting all requirements, append them to {workflowPlanFile} in a format that will be be used later to design in more detail and create the workflow structure.
This information will be used in the design phase to create the workflow structure.
### 8. Present MENU OPTIONS
### 9. Present MENU OPTIONS
Display: **Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue
@ -210,7 +188,7 @@ Display: **Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Conti
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN C is selected and requirements are stored, will you then load, read entire file, then execute {nextStepFile} to execute and begin workflow structure design step.
ONLY WHEN C is selected and requirements are stored in the output file, will you then load, read entire file, then execute {nextStepFile} to execute and begin workflow structure design step.
---

View File

@ -0,0 +1,250 @@
---
name: 'step-03-tools-configuration'
description: 'Configure all required tools (core, memory, external) and installation requirements in one comprehensive step'
# Path Definitions
workflow_path: '{project-root}/{bmad_folder}/bmb/workflows/create-workflow'
# File References
thisStepFile: '{workflow_path}/steps/step-03-tools-configuration.md'
nextStepFile: '{workflow_path}/steps/step-04-plan-review.md'
targetWorkflowPath: '{custom_workflow_location}/{new_workflow_name}'
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
# Documentation References
commonToolsCsv: '{project-root}/{bmad_folder}/bmb/docs/workflows/common-workflow-tools.csv'
# Task References
advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
# Template References
# No template needed - will append tools configuration directly to workflow plan
---
# Step 3: Tools Configuration
## STEP GOAL:
To comprehensively configure all tools needed for the workflow (core tools, memory, external tools) and determine installation requirements.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
- 📋 YOU ARE A FACILITATOR, not a content generator
### Role Reinforcement:
- ✅ You are a workflow architect and integration specialist
- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role
- ✅ We engage in collaborative dialogue, not command-response
- ✅ You bring expertise in BMAD tools and integration patterns
- ✅ User brings their workflow requirements and preferences
### Step-Specific Rules:
- 🎯 Focus ONLY on configuring tools based on workflow requirements
- 🚫 FORBIDDEN to skip tool categories - each affects workflow design
- 💬 Present options clearly, let user make informed choices
- 🚫 DO NOT hardcode tool descriptions - reference CSV
## EXECUTION PROTOCOLS:
- 🎯 Load tools dynamically from CSV, not hardcoded
- 💾 Document all tool choices in workflow plan
- 📖 Update frontmatter `stepsCompleted: [1, 2, 3]` before loading next step
- 🚫 FORBIDDEN to load next step until user selects 'C'
## CONTEXT BOUNDARIES:
- Requirements from step 2 inform tool selection
- All tool choices affect workflow design
- This is the ONLY tools configuration step
- Installation requirements affect implementation decisions
## TOOLS CONFIGURATION PROCESS:
### 1. Initialize Tools Configuration
"Configuring **Tools and Integrations**
Based on your workflow requirements, let's configure all the tools your workflow will need. This includes core BMAD tools, memory systems, and any external integrations."
### 2. Load and Present Available Tools
Load `{commonToolsCsv}` and present tools by category:
"**Available BMAD Tools and Integrations:**
**Core Tools (Always Available):**
- [List tools from CSV where propose='always', with descriptions]
**Optional Tools (Available When Needed):**
- [List tools from CSV where propose='example', with descriptions]
_Note: I'm loading these dynamically from our tools database to ensure you have the most current options._"
### 3. Configure Core BMAD Tools
"**Core BMAD Tools Configuration:**
These tools significantly enhance workflow quality and user experience:"
For each core tool from CSV (`propose='always'`):
1. **Party-Mode**
- Use case: [description from CSV]
- Where to integrate: [ask user for decision points, creative phases]
2. **Advanced Elicitation**
- Use case: [description from CSV]
- Where to integrate: [ask user for quality gates, review points]
3. **Brainstorming**
- Use case: [description from CSV]
- Where to integrate: [ask user for idea generation, innovation points]
### 4. Configure LLM Features
"**LLM Feature Integration:**
These capabilities enhance what your workflow can do:"
From CSV (`propose='always'` LLM features):
4. **Web-Browsing**
- Capability: [description from CSV]
- When needed: [ask user about real-time data needs]
5. **File I/O**
- Capability: [description from CSV]
- Operations: [ask user about file operations needed]
6. **Sub-Agents**
- Capability: [description from CSV]
- Use cases: [ask user about delegation needs]
7. **Sub-Processes**
- Capability: [description from CSV]
- Use cases: [ask user about parallel processing needs]
### 5. Configure Memory Systems
"**Memory and State Management:**
Determine if your workflow needs to maintain state between sessions:"
From CSV memory tools:
8. **Sidecar File**
- Use case: [description from CSV]
- Needed when: [ask about session continuity, agent initialization]
### 6. Configure External Tools (Optional)
"**External Integrations (Optional):**
These tools connect your workflow to external systems:"
From CSV (`propose='example'`):
- MCP integrations, database connections, APIs, etc.
- For each relevant tool: present description and ask if needed
- Note any installation requirements
### 7. Installation Requirements Assessment
"**Installation and Dependencies:**
Some tools require additional setup:"
Based on selected tools:
- Identify tools requiring installation
- Assess user's comfort level with installations
- Document installation requirements
### 8. Document Complete Tools Configuration
Append to {workflowPlanFile}:
```markdown
## Tools Configuration
### Core BMAD Tools
- **Party-Mode**: [included/excluded] - Integration points: [specific phases]
- **Advanced Elicitation**: [included/excluded] - Integration points: [specific phases]
- **Brainstorming**: [included/excluded] - Integration points: [specific phases]
### LLM Features
- **Web-Browsing**: [included/excluded] - Use cases: [specific needs]
- **File I/O**: [included/excluded] - Operations: [file management needs]
- **Sub-Agents**: [included/excluded] - Use cases: [delegation needs]
- **Sub-Processes**: [included/excluded] - Use cases: [parallel processing needs]
### Memory Systems
- **Sidecar File**: [included/excluded] - Purpose: [state management needs]
### External Integrations
- [List selected external tools with purposes]
### Installation Requirements
- [List tools requiring installation]
- **User Installation Preference**: [willing/not willing]
- **Alternative Options**: [if not installing certain tools]
```
### 9. Present MENU OPTIONS
Display: **Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue
#### EXECUTION RULES:
- ALWAYS halt and wait for user input after presenting menu
- ONLY proceed to next step when user selects 'C'
- After other menu items execution, return to this menu
- User can chat or ask questions - always respond and then end with display again of the menu options
- Use menu handling logic section below
#### Menu Handling Logic:
- IF A: Execute {advancedElicitationTask}
- IF P: Execute {partyModeWorkflow}
- IF C: Save tools configuration to {workflowPlanFile}, update frontmatter, then load, read entire file, then execute {nextStepFile}
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#9-present-menu-options)
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN C is selected and tools configuration is saved will you load {nextStepFile} to review the complete plan.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- All tool categories configured based on requirements
- User made informed choices for each tool
- Complete configuration documented in plan
- Installation requirements identified
- Ready to proceed to plan review
### ❌ SYSTEM FAILURE:
- Skipping tool categories
- Hardcoding tool descriptions instead of using CSV
- Not documenting user choices
- Proceeding without user confirmation
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.

View File

@ -1,127 +0,0 @@
---
name: 'step-03-tools-overview'
description: 'Present available tools from CSV and gather initial user requirements'
# Path Definitions
workflow_path: '{project-root}/{bmad_folder}/bmb/workflows/create-workflow'
# File References
thisStepFile: '{workflow_path}/steps/step-03-tools-overview.md'
nextStepFile: '{workflow_path}/steps/step-04-core-tools.md'
workflowFile: '{workflow_path}/workflow.md'
workflowPlanFile: '{output_folder}/workflow-plan-{new_workflow_name}.md'
# Documentation References
commonToolsCsv: '{project-root}/{bmad_folder}/bmb/docs/workflows/common-workflow-tools.csv'
---
# Step 3: Tools Overview
## STEP GOAL:
Load and present available tools from the CSV, then gather the user's general tool requirements for their workflow.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read the complete step file before taking any action
- 📋 YOU ARE A FACILITATOR, not a content generator
### Role Reinforcement:
- ✅ You are a workflow architect and integration specialist
- ✅ We engage in collaborative dialogue, not command-response
- ✅ You bring expertise in BMAD tools and workflow optimization
- ✅ User brings their workflow requirements
## EXECUTION PROTOCOLS:
- 🎯 Load CSV and present tools dynamically
- 💾 Gather user's general tool requirements
- 📖 Document requirements in workflow plan
- 🚫 FORBIDDEN to proceed without user input
## SEQUENCE OF INSTRUCTIONS:
### 1. Initialize Tools Discussion
"Beginning **Tools Integration and Configuration**
Based on your workflow requirements, I'll help identify the best tools and integrations. Let me first load the available tools from our reference."
### 2. Load and Present Available Tools
Load `{commonToolsCsv}` and present tools organized by type:
"**Available BMAD Tools and Integrations:**
**Always Available (Recommended for Most Workflows):**
- [List tools from CSV where propose='always', organized by type]
**Example Tools (Available When Needed):**
- [List tools from CSV where propose='example', organized by type]
\*\*Tools requiring installation will be noted."
### 3. Gather Initial Requirements
"**Your Tool Requirements:**
Based on your workflow type and goals, what tools do you anticipate needing?
1. **Core BMAD Tools:** Do you want collaborative idea generation, critical evaluation, or brainstorming capabilities?
2. **LLM Features:** Will you need web access, file management, sub-agents, or parallel processing?
3. **Memory:** Does your workflow need persistent state across sessions?
4. **External Tools:** Will you need MCP integrations like documentation access, browser automation, or database connections?
**Initial Tool Preferences:** [gather user's general requirements]"
### 4. Document Requirements
Append to {workflowPlanFile}:
```markdown
## Tool Requirements Summary
**Initial Tool Preferences:**
- Core BMAD Tools: [user selections]
- LLM Features: [user selections]
- Memory Requirements: [user selections]
- External Tools: [user selections]
**Installation Willingness:** [user comfort level with installing tools]
```
### 5. Menu Options
Display: **Select an Option:** [C] Continue to Core Tools [M] Modify Requirements
#### Menu Handling Logic:
- IF C: Append tools overview to {workflowPlanFile}, update frontmatter, then load {nextStepFile}
- IF M: Refine requirements discussion
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN C is selected and requirements are documented will you load {nextStepFile} to configure core tools.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- CSV loaded and tools presented clearly
- User's initial tool requirements gathered
- Requirements documented in workflow plan
- User ready to proceed to detailed configuration
### ❌ SYSTEM FAILURE:
- Not loading tools from CSV
- Duplicating CSV content in step file
- Proceeding without user requirements input

View File

@ -1,145 +0,0 @@
---
name: 'step-04-core-tools'
description: 'Configure always-available core tools and their integration points'
# Path Definitions
workflow_path: '{project-root}/{bmad_folder}/bmb/workflows/create-workflow'
# File References
thisStepFile: '{workflow_path}/steps/step-04-core-tools.md'
nextStepFile: '{workflow_path}/steps/step-05-memory-requirements.md'
workflowFile: '{workflow_path}/workflow.md'
workflowPlanFile: '{output_folder}/workflow-plan-{new_workflow_name}.md'
# Documentation References
commonToolsCsv: '{project-root}/{bmad_folder}/bmb/docs/workflows/common-workflow-tools.csv'
---
# Step 4: Core Tools Configuration
## STEP GOAL:
Configure always-available core tools (party-mode, advanced-elicitation, brainstorming, and LLM features) with specific integration points in the workflow.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read the complete step file before taking any action
- 📋 YOU ARE A FACILITATOR, not a content generator
### Role Reinforcement:
- ✅ You are a workflow architect and integration specialist
- ✅ We engage in collaborative dialogue, not command-response
- ✅ You bring expertise in BMAD tools and integration patterns
## EXECUTION PROTOCOLS:
- 🎯 Load core tools from CSV and configure integration points
- 💾 Confirm user choices for each core tool
- 📖 Document configuration in workflow plan
- 🚫 FORBIDDEN to proceed without user confirmation
## SEQUENCE OF INSTRUCTIONS:
### 1. Initialize Core Tools Configuration
"Configuring **Core BMAD Tools and Features**
These core tools significantly enhance workflow quality. Let's configure each one for optimal integration into your workflow."
### 2. Present Core Tools from CSV
Load `{commonToolsCsv}` and filter for `propose='always'`:
"**Core Tools (Always Available):**
**Workflows & Tasks:**
- **Party-Mode:** [description from CSV]
- **Advanced Elicitation:** [description from CSV]
- **Brainstorming:** [description from CSV]
**LLM Tool Features:**
- **Web-Browsing:** [description from CSV]
- **File I/O:** [description from CSV]
- **Sub-Agents:** [description from CSV]
- **Sub-Processes:** [description from CSV]
**Tool-Memory:**
- **Sidecar File:** [description from CSV]"
### 3. Configure Integration Points
For each tool, ask about integration:
"**Core Tools Integration:**
**Workflows & Tasks:**
1. **Party-Mode** - Where should collaborative AI sessions be offered? [decision points, creative phases]
2. **Advanced Elicitation** - Where should critical evaluation checkpoints be placed? [after content creation, quality gates]
3. **Brainstorming** - Where should creative ideation be integrated? [idea generation phases, innovation points]
**LLM Features:** 4. **Web-Browsing** - When is current information needed? [real-time data, current events] 5. **File I/O** - What document operations are required? [file creation, data management] 6. **Sub-Agents** - Where would specialized delegation help? [complex tasks, parallel processing] 7. **Sub-Processes** - Where would parallel processing improve performance? [long operations, resource optimization]
**Tool-Memory:** 8. **Sidecar File** - Does your workflow need persistent state? [session continuity, agent initialization]"
### 4. Document Core Tools Configuration
Append to {workflowPlanFile}:
```markdown
## Core Tools Configuration
### Workflows & Tasks
**Party-Mode:** [included/excluded] - Integration points: [specific phases]
**Advanced Elicitation:** [included/excluded] - Integration points: [specific phases]
**Brainstorming:** [included/excluded] - Integration points: [specific phases]
### LLM Tool Features
**Web-Browsing:** [included/excluded] - Integration points: [specific phases]
**File I/O:** [included/excluded] - Integration points: [specific phases]
**Sub-Agents:** [included/excluded] - Integration points: [specific phases]
**Sub-Processes:** [included/excluded] - Integration points: [specific phases]
### Tool-Memory
**Sidecar File:** [included/excluded] - Use case: [history tracking, agent initialization]
```
### 5. Menu Options
Display: **Select an Option:** [C] Continue to Memory Configuration [M] Modify Core Tools
#### Menu Handling Logic:
- IF C: Append core tools configuration to {workflowPlanFile}, update frontmatter, then load {nextStepFile}
- IF M: Return to tool configuration
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN C is selected and core tools are documented will you load {nextStepFile} to configure memory requirements.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Core tools presented using CSV descriptions
- Integration points configured for each selected tool
- Configuration documented in workflow plan
- User understands how tools enhance workflow
### ❌ SYSTEM FAILURE:
- Duplicating CSV content instead of referencing it
- Not confirming integration points with user
- Proceeding without user confirmation of configuration

View File

@ -0,0 +1,216 @@
---
name: 'step-04-plan-review'
description: 'Review complete workflow plan (requirements + tools) and get user approval before design'
# Path Definitions
workflow_path: '{project-root}/{bmad_folder}/bmb/workflows/create-workflow'
# File References
thisStepFile: '{workflow_path}/steps/step-04-plan-review.md'
nextStepFormDesign: '{workflow_path}/steps/step-05-output-format-design.md'
nextStepDesign: '{workflow_path}/steps/step-06-design.md'
targetWorkflowPath: '{custom_workflow_location}/{new_workflow_name}'
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
# Task References
advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
# Template References
# No template needed - will append review summary directly to workflow plan
---
# Step 4: Plan Review and Approval
## STEP GOAL:
To present the complete workflow plan (requirements and tools configuration) for user review and approval before proceeding to design.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
- 📋 YOU ARE A FACILITATOR, not a content generator
### Role Reinforcement:
- ✅ You are a workflow architect and systems designer
- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role
- ✅ We engage in collaborative dialogue, not command-response
- ✅ You bring expertise in workflow design review and quality assurance
- ✅ User brings their specific requirements and approval authority
### Step-Specific Rules:
- 🎯 Focus ONLY on reviewing and refining the plan
- 🚫 FORBIDDEN to start designing workflow steps in this step
- 💬 Present plan clearly and solicit feedback
- 🚫 DO NOT proceed to design without user approval
## EXECUTION PROTOCOLS:
- 🎯 Present complete plan summary from {workflowPlanFile}
- 💾 Capture any modifications or refinements
- 📖 Update frontmatter `stepsCompleted: [1, 2, 3, 4]` before loading next step
- 🚫 FORBIDDEN to load next step until user approves plan
## CONTEXT BOUNDARIES:
- All requirements from step 2 are available
- Tools configuration from step 3 is complete
- Focus ONLY on review and approval
- This is the final check before design phase
## PLAN REVIEW PROCESS:
### 1. Initialize Plan Review
"**Workflow Plan Review**
We've gathered all requirements and configured tools for your workflow. Let's review the complete plan to ensure it meets your needs before we start designing the workflow structure."
### 2. Present Complete Plan Summary
Load and present from {workflowPlanFile}:
"**Complete Workflow Plan: {new_workflow_name}**
**1. Project Overview:**
- [Present workflow purpose, user type, module from plan]
**2. Workflow Requirements:**
- [Present all gathered requirements]
**3. Tools Configuration:**
- [Present selected tools and integration points]
**4. Technical Specifications:**
- [Present technical constraints and requirements]
**5. Success Criteria:**
- [Present success metrics from requirements]"
### 3. Detailed Review by Category
"**Detailed Review:**
**A. Workflow Scope and Purpose**
- Is the workflow goal clearly defined?
- Are the boundaries appropriate?
- Any missing requirements?
**B. User Interaction Design**
- Does the interaction style match your needs?
- Are collaboration points clear?
- Any adjustments needed?
**C. Tools Integration**
- Are selected tools appropriate for your workflow?
- Are integration points logical?
- Any additional tools needed?
**D. Technical Feasibility**
- Are all requirements achievable?
- Any technical constraints missing?
- Installation requirements acceptable?"
### 4. Collect Feedback and Refinements
"**Review Feedback:**
Please review each section and provide feedback:
1. What looks good and should stay as-is?
2. What needs modification or refinement?
3. What's missing that should be added?
4. Anything unclear or confusing?"
For each feedback item:
- Document the requested change
- Discuss implications on workflow design
- Confirm the refinement with user
### 5. Update Plan with Refinements
Update {workflowPlanFile} with any approved changes:
- Modify requirements section as needed
- Update tools configuration if changed
- Add any missing specifications
- Ensure all changes are clearly documented
### 6. Output Document Check
"**Output Document Check:**
Before we proceed to design, does your workflow produce any output documents or files?
Based on your requirements:
- [Analyze if workflow produces documents/files]
- Consider: Does it create reports, forms, stories, or any persistent output?"
**If NO:**
"Great! Your workflow focuses on actions/interactions without document output. We'll proceed directly to designing the workflow steps."
**If YES:**
"Perfect! Let's design your output format to ensure your workflow produces exactly what you need."
### 7. Present MENU OPTIONS
Display: **Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue to Design
#### EXECUTION RULES:
- ALWAYS halt and wait for user input after presenting menu
- ONLY proceed to next step when user selects 'C'
- After other menu items execution, return to this menu
- User can chat or ask questions - always respond and then end with display again of the menu options
- Use menu handling logic section below
#### Menu Handling Logic:
- IF A: Execute {advancedElicitationTask}
- IF P: Execute {partyModeWorkflow}
- IF C: Check if workflow produces documents:
- If YES: Update frontmatter, then load nextStepFormDesign
- If NO: Update frontmatter, then load nextStepDesign
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#7-present-menu-options)
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN C is selected AND the user has explicitly approved the plan and the plan document is updated as needed, then you load either {nextStepFormDesign} or {nextStepDesign}
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Complete plan presented clearly from {workflowPlanFile}
- User feedback collected and documented
- All refinements incorporated
- User explicitly approves the plan
- Plan ready for design phase
### ❌ SYSTEM FAILURE:
- Not loading plan from {workflowPlanFile}
- Skipping review categories
- Proceeding without user approval
- Not documenting refinements
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.

View File

@ -1,136 +0,0 @@
---
name: 'step-05-memory-requirements'
description: 'Assess memory requirements and configure memory implementation'
# Path Definitions
workflow_path: '{project-root}/{bmad_folder}/bmb/workflows/create-workflow'
# File References
thisStepFile: '{workflow_path}/steps/step-05-memory-requirements.md'
nextStepFile: '{project_path}/steps/step-06-external-tools.md'
workflowFile: '{workflow_path}/workflow.md'
workflowPlanFile: '{output_folder}/workflow-plan-{new_workflow_name}.md'
# Documentation References
commonToolsCsv: '{project-root}/{bmad_folder}/bmb/docs/workflows/common-workflow-tools.csv'
---
# Step 5: Memory Requirements Assessment
## STEP GOAL:
Assess whether the workflow needs memory capabilities and configure appropriate memory implementation.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read the complete step file before taking any action
- 📋 YOU ARE A FACILITATOR, not a content generator
### Role Reinforcement:
- ✅ You are a workflow architect and integration specialist
- ✅ We engage in collaborative dialogue, not command-response
- ✅ You bring expertise in memory implementation patterns
## EXECUTION PROTOCOLS:
- 🎯 Assess memory needs based on workflow requirements
- 💾 Present memory options from CSV
- 📖 Configure memory implementation if needed
- 🚫 FORBIDDEN to push memory when not required
## SEQUENCE OF INSTRUCTIONS:
### 1. Initialize Memory Assessment
"Assessing **Memory Requirements**
Most workflows complete their task and exit without needing persistent memory. However, some specialized workflows benefit from session-to-session continuity."
### 2. Present Memory Options from CSV
Load `{commonToolsCsv}` and filter for `type='tool-memory'`:
"**Memory Options:**
**Available Memory Types:**
- [List tool-memory options from CSV with descriptions]
**Key Question:** Does your workflow need to maintain state across multiple sessions?"
### 3. Memory Requirements Analysis
"**Memory Assessment Questions:**
1. **Session Continuity:** Will your workflow need to resume where it left off?
2. **Agent Initialization:** Will your workflow initialize agents with previous context?
3. **Pattern Recognition:** Would semantic search of past experiences be valuable?
4. **Self-Improvement:** Will your workflow learn from previous executions?
**Most workflows:** No memory needed (they complete and exit)
**Some workflows:** Sidecar files for history tracking
**Advanced workflows:** Vector database for semantic learning"
### 4. Configure Memory (If Needed)
If user selects memory:
"**Memory Configuration:**
Based on your needs, which memory type?
1. **Sidecar File** - History tracking and session continuity
2. **Vector Database** - Semantic search and pattern recognition
3. **Both** - Comprehensive memory capabilities
4. **None** - No persistent memory required
**Memory Management:** Privacy controls, cleanup strategies, access patterns"
### 5. Document Memory Configuration
Append to {workflowPlanFile}:
```markdown
## Memory Configuration
### Memory Requirements
**Sidecar File:** [selected/not selected] - Use case: [specific implementation]
**Vector Database:** [selected/not selected] - Use case: [specific implementation]
**Memory Management:** [cleanup, privacy, access patterns]
**Integration:** [how memory enhances workflow continuity]
```
### 6. Menu Options
Display: **Select an Option:** [C] Continue to External Tools [M] Modify Memory
#### Menu Handling Logic:
- IF C: Append memory configuration to {workflowPlanFile}, update frontmatter, then load {nextStepFile}
- IF M: Refine memory requirements
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN C is selected and memory is documented will you load {nextStepFile} to configure external tools.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Memory options presented from CSV
- User's memory needs properly assessed
- Configuration documented appropriately
- No memory pushed when not needed
### ❌ SYSTEM FAILURE:
- Assuming memory is needed without assessment
- Duplicating CSV descriptions in step file
- Not documenting memory management strategies

View File

@ -0,0 +1,289 @@
---
name: 'step-05-output-format-design'
description: 'Design the output format for workflows that produce documents or files'
# Path Definitions
workflow_path: '{project-root}/{bmad_folder}/bmb/workflows/create-workflow'
# File References
thisStepFile: '{workflow_path}/steps/step-05-output-format-design.md'
nextStepFile: '{workflow_path}/steps/step-06-design.md'
targetWorkflowPath: '{custom_workflow_location}/{new_workflow_name}'
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
# Task References
advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
---
# Step 5: Output Format Design
## STEP GOAL:
To design and document the output format for workflows that produce documents or files, determining whether they need strict templates or flexible formatting.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
- 📋 YOU ARE A FACILITATOR, not a content generator
### Role Reinforcement:
- ✅ You are a workflow architect and output format specialist
- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role
- ✅ We engage in collaborative dialogue, not command-response
- ✅ You bring expertise in document design and template creation
- ✅ User brings their specific output requirements and preferences
### Step-Specific Rules:
- 🎯 Focus ONLY on output format design
- 🚫 FORBIDDEN to design workflow steps in this step
- 💬 Help user understand the format spectrum
- 🚫 DO NOT proceed without clear format requirements
## EXECUTION PROTOCOLS:
- 🎯 Guide user through format spectrum with examples
- 💾 Document format decisions in workflow plan
- 📖 Update frontmatter `stepsCompleted: [1, 2, 3, 4, 5]` before loading next step
- 🚫 FORBIDDEN to load next step until user selects 'C'
## CONTEXT BOUNDARIES:
- Approved plan from step 4 is available
- Focus ONLY on output document formatting
- Skip this step if workflow produces no documents
- This step only runs when documents need structure
## OUTPUT FORMAT DESIGN PROCESS:
### 1. Initialize Output Format Discussion
"**Designing Your Output Format**
Based on your approved plan, your workflow will produce output documents. Let's design how these outputs should be formatted."
### 2. Present the Format Spectrum
"**Output Format Spectrum - Where does your workflow fit?**
**Strictly Structured Examples:**
- Government forms - exact fields, precise positions
- Legal documents - must follow specific templates
- Technical specifications - required sections, specific formats
- Compliance reports - mandatory fields, validation rules
**Structured Examples:**
- Project reports - required sections, flexible content
- Business proposals - consistent format, customizable sections
- Technical documentation - standard structure, adaptable content
- Research papers - IMRAD format, discipline-specific variations
**Semi-structured Examples:**
- Character sheets (D&D) - core stats + flexible background
- Lesson plans - required components, flexible delivery
- Recipes - ingredients/method format, flexible descriptions
- Meeting minutes - agenda/attendees/actions, flexible details
**Free-form Examples:**
- Creative stories - narrative flow, minimal structure
- Blog posts - title/body, organic organization
- Personal journals - date/entry, free expression
- Brainstorming outputs - ideas, flexible organization"
### 3. Determine Format Type
"**Which format type best fits your workflow?**
1. **Strict Template** - Must follow exact format with specific fields
2. **Structured** - Required sections but flexible within each
3. **Semi-structured** - Core sections plus optional additions
4. **Free-form** - Content-driven with minimal structure
Please choose 1-4:"
### 4. Deep Dive Based on Choice
#### IF Strict Template (Choice 1):
"**Strict Template Design**
You need exact formatting. Let's define your requirements:
**Template Source Options:**
A. Upload existing template/image to follow
B. Create new template from scratch
C. Use standard form (e.g., government, industry)
D. AI proposes template based on your needs
**Template Requirements:**
- Exact field names and positions
- Required vs optional fields
- Validation rules
- File format (PDF, DOCX, etc.)
- Any legal/compliance considerations"
#### IF Structured (Choice 2):
"**Structured Document Design**
You need consistent sections with flexibility:
**Section Definition:**
- What sections are required?
- Any optional sections?
- Section ordering rules?
- Cross-document consistency needs?
**Format Guidelines:**
- Any formatting standards (APA, MLA, corporate)?
- Section header styles?
- Content organization principles?"
#### IF Semi-structured (Choice 3):
"**Semi-structured Design**
Core sections with flexibility:
**Core Components:**
- What information must always appear?
- Which parts can vary?
- Any organizational preferences?
**Polishing Options:**
- Would you like automatic TOC generation?
- Summary section at the end?
- Consistent formatting options?"
#### IF Free-form (Choice 4):
"**Free-form Content Design**
Focus on content with minimal structure:
**Organization Needs:**
- Basic headers for readability?
- Date/title information?
- Any categorization needs?
**Final Polish Options:**
- Auto-generated summary?
- TOC based on content?
- Formatting for readability?"
### 5. Template Creation (if applicable)
For Strict/Structured workflows:
"**Template Creation Approach:**
A. **Design Together** - We'll create the template step by step
B. **AI Proposes** - I'll suggest a structure based on your needs
C. **Import Existing** - Use/upload your existing template
Which approach would you prefer?"
If A or B:
- Design/create template sections
- Define placeholders
- Specify field types and validation
- Document template structure in plan
If C:
- Request file upload or detailed description
- Analyze template structure
- Document requirements
### 6. Document Format Decisions
Append to {workflowPlanFile}:
```markdown
## Output Format Design
**Format Type**: [Strict/Structured/Semi-structured/Free-form]
**Output Requirements**:
- Document type: [report/form/story/etc]
- File format: [PDF/MD/DOCX/etc]
- Frequency: [single/batch/continuous]
**Structure Specifications**:
[Detailed structure based on format type]
**Template Information**:
- Template source: [created/imported/standard]
- Template file: [path if applicable]
- Placeholders: [list if applicable]
**Special Considerations**:
- Legal/compliance requirements
- Validation needs
- Accessibility requirements
```
### 7. Present MENU OPTIONS
Display: **Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue
#### EXECUTION RULES:
- ALWAYS halt and wait for user input after presenting menu
- ONLY proceed to next step when user selects 'C'
- After other menu items execution, return to this menu
- User can chat or ask questions - always respond and then end with display again of the menu options
- Use menu handling logic section below
#### Menu Handling Logic:
- IF A: Execute {advancedElicitationTask}
- IF P: Execute {partyModeWorkflow}
- IF C: Save output format design to {workflowPlanFile}, update frontmatter, then load, read entire file, then execute {nextStepFile}
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#7-present-menu-options)
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN C is selected and output format is documented will you load {nextStepFile} to begin workflow step design.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- User understands format spectrum
- Format type clearly identified
- Template requirements documented (if applicable)
- Output format saved in plan
### ❌ SYSTEM FAILURE:
- Not showing format examples
- Skipping format requirements
- Not documenting decisions in plan
- Assuming format without asking
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.

View File

@ -1,31 +1,30 @@
---
name: 'step-09-design'
description: 'Design the workflow structure and step sequence based on gathered requirements and tools configuration'
name: 'step-06-design'
description: 'Design the workflow structure and step sequence based on gathered requirements, tools configuration, and output format'
# Path Definitions
workflow_path: '{project-root}/{bmad_folder}/bmb/workflows/create-workflow'
# File References
thisStepFile: '{workflow_path}/steps/step-09-design.md'
nextStepFile: '{workflow_path}/steps/step-10-plan-review.md'
thisStepFile: '{workflow_path}/steps/step-06-design.md'
nextStepFile: '{workflow_path}/steps/step-07-build.md'
workflowFile: '{workflow_path}/workflow.md'
# Output files for workflow creation process
workflowPlanFile: '{output_folder}/workflow-plan-{new_workflow_name}.md'
targetWorkflowPath: '{custom_workflow_location}/{new_workflow_name}'
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
# Task References
advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
# Template References
designTemplate: '{workflow_path}/templates/design-section.md'
# No template needed - will append design details directly to workflow plan
---
# Step 3: Workflow Structure Design
# Step 6: Workflow Structure Design
## STEP GOAL:
To collaboratively design the workflow structure, step sequence, and interaction patterns based on the requirements gathered in the previous step.
To collaboratively design the workflow structure, step sequence, and interaction patterns based on the approved plan and output format requirements.
## MANDATORY EXECUTION RULES (READ FIRST):
@ -55,12 +54,13 @@ To collaboratively design the workflow structure, step sequence, and interaction
- 🎯 Guide collaborative design process
- 💾 After completing design, append to {workflowPlanFile}
- 📖 Update plan frontmatter `stepsCompleted: [1, 2, 3]` before loading next step
- 📖 Update plan frontmatter `stepsCompleted: [1, 2, 3, 4, 5, 6]` before loading next step
- 🚫 FORBIDDEN to load next step until user selects 'C' and design is saved
## CONTEXT BOUNDARIES:
- Requirements from step 2 are available and should inform design
- Approved plan from step 4 is available and should inform design
- Output format design from step 5 (if completed) guides structure
- Load architecture documentation when needed for guidance
- Focus ONLY on structure and flow design
- Don't implement actual files in this step
@ -74,7 +74,6 @@ When designing, you may load these documents as needed:
- `{project-root}/{bmad_folder}/bmb/docs/workflows/templates/step-01-init-continuable-template.md` - Continuable init step template
- `{project-root}/{bmad_folder}/bmb/docs/workflows/templates/step-1b-template.md` - Continuation step template
- `{project-root}/{bmad_folder}/bmb/docs/workflows/templates/workflow-template.md` - Workflow configuration
- `{project-root}/{bmad_folder}/bmb/docs/workflows/architecture.md` - Architecture principles
- `{project-root}/{bmad_folder}/bmb/reference/workflows/meal-prep-nutrition/workflow.md` - Complete example
## WORKFLOW DESIGN PROCESS:
@ -97,7 +96,7 @@ Read: {project-root}/{bmad_folder}/bmb/docs/workflows/templates/step-1b-template
This shows the continuation step pattern for workflows that might take multiple sessions.
Based on the requirements, collaboratively design:
Based on the approved plan, collaboratively design:
- How many major steps does this workflow need? (Recommend 3-7)
- What is the goal of each step?
@ -199,31 +198,35 @@ Present the design for review:
- Ensure steps can be loaded independently
- Design for Just-In-Time loading
### Collaborative Dialogue
### Sequential Flow with Clear Progression
- Design for conversation, not command-response
- Include decision points for user input
- Make the workflow adaptable to user context
- Each step should build on previous work
- Include clear decision points
- Maintain logical progression toward goal
### Sequential Enforcement
### Menu-Based Interactions
- Design clear step dependencies
- Ensure logical flow between steps
- Include state tracking for progress
- Include consistent menu patterns
- Provide clear options at decision points
- Allow for conversation within steps
### Error Prevention
### State Management
- Include validation at key points
- Design for common failure scenarios
- Provide clear guidance to users
- Track progress using `stepsCompleted` array
- Persist state in output file frontmatter
- Support continuation where appropriate
## CONTENT TO APPEND TO PLAN:
### 9. Document Design in Plan
After completing the design, append to {workflowPlanFile}:
Append to {workflowPlanFile}:
Load and append the content from {designTemplate}
- Complete step outline with names and purposes
- Flow diagram or sequence description
- Interaction patterns
- File structure requirements
- Special features and handling
### 9. Present MENU OPTIONS
### 10. Present MENU OPTIONS
Display: **Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue
@ -239,12 +242,12 @@ Display: **Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Conti
- IF A: Execute {advancedElicitationTask}
- IF P: Execute {partyModeWorkflow}
- IF C: Save content to {workflowPlanFile}, update frontmatter, then only then load, read entire file, then execute {nextStepFile}
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#9-present-menu-options)
- IF C: Save design to {workflowPlanFile}, update frontmatter, then load, read entire file, then execute {nextStepFile}
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#10-present-menu-options)
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN C is selected and content is saved to workflow plan and frontmatter is updated, will you then load, read entire file, then execute {nextStepFile} to execute and begin workflow file generation step.
ONLY WHEN C is selected and design is saved will you load {nextStepFile} to begin implementation.
---
@ -253,16 +256,16 @@ ONLY WHEN C is selected and content is saved to workflow plan and frontmatter is
### ✅ SUCCESS:
- Workflow structure designed collaboratively
- Step sequence mapped and agreed upon
- Interaction patterns designed
- Design documented in {outputFile}
- Frontmatter updated with step completion
- All steps clearly defined and sequenced
- Interaction patterns established
- File structure planned
- User agreement on design
### ❌ SYSTEM FAILURE:
- Creating implementation details instead of design
- Skipping design review with user
- Proceeding without complete design
- Not updating document frontmatter
- Designing without user collaboration
- Skipping design principles
- Not documenting design in plan
- Proceeding without user agreement
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.

View File

@ -1,154 +0,0 @@
---
name: 'step-06-external-tools'
description: 'Configure MCP integrations and installation requirements'
# Path Definitions
workflow_path: '{project-root}/{bmad_folder}/bmb/workflows/create-workflow'
# File References
thisStepFile: '{workflow_path}/steps/step-06-external-tools.md'
nextStepFile: '{workflow_path}/steps/step-07-installation-guidance.md'
workflowFile: '{workflow_path}/workflow.md'
workflowPlanFile: '{output_folder}/workflow-plan-{new_workflow_name}.md'
# Documentation References
commonToolsCsv: '{project-root}/{bmad_folder}/bmb/docs/workflows/common-workflow-tools.csv'
---
# Step 6: External Tools Configuration
## STEP GOAL:
Identify and configure MCP integrations and external tools that the workflow requires.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read the complete step file before taking any action
- 📋 YOU ARE A FACILITATOR, not a content generator
### Role Reinforcement:
- ✅ You are a workflow architect and integration specialist
- ✅ We engage in collaborative dialogue, not command-response
- ✅ You bring expertise in MCP integrations and external tools
## EXECUTION PROTOCOLS:
- 🎯 Load external tools from CSV
- 💾 Identify specific MCP needs for workflow
- 📖 Document which tools require installation
- 🚫 FORBIDDEN to proceed without confirming tool selections
## SEQUENCE OF INSTRUCTIONS:
### 1. Initialize External Tools Assessment
"Configuring **External Tools and MCP Integrations**
These tools extend workflow capabilities but typically require installation. Let's identify what your workflow actually needs."
### 2. Present External Tools from CSV
Load `{commonToolsCsv}` and filter for `propose='example'` and `type='mcp'`:
"**Available External Tools:**
**MCP Integrations (Require Installation):**
- [List MCP tools from CSV with URLs and descriptions]
**Example Workflows/Tasks:**
- [List example workflows/tasks from CSV with descriptions]
**Installation Note:** Tools marked with `requires_install=yes` will need setup steps."
### 3. Identify Specific Tool Needs
"**External Tool Requirements:**
Based on your workflow goals, which external tools do you need?
**Common MCP Needs:**
- **Documentation Access:** Context-7 for current API docs
- **Browser Automation:** Playwright for web interactions
- **Git Operations:** Direct version control integration
- **Database Access:** Multiple database connectivity
- **Custom Tools:** Any domain-specific MCPs you need
**Your Requirements:**
1. What external data or APIs will your workflow access?
2. Does your workflow need web browser automation?
3. Will it interact with version control systems?
4. Are database connections required?
5. Any custom MCPs you plan to use?"
### 4. Document External Tools Selection
Append to {workflowPlanFile}:
```markdown
## External Tools Configuration
### MCP Integrations
**Selected Tools:** [list from CSV]
**Purpose:** [how each MCP enhances workflow]
**Integration Points:** [where external tools are essential]
**Installation Required:** [yes/no, which tools]
### Example Workflows/Tasks
**Selected:** [list chosen workflows/tasks]
**Purpose:** [how they enhance workflow capabilities]
**Integration:** [where they fit in workflow flow]
```
### 5. Installation Assessment
"**Installation Requirements Assessment:**
**Tools Requiring Installation:** [list from CSV where requires_install=yes]
**Installation Guidance Options:**
1. Include detailed setup steps in workflow
2. Provide user installation checklist
3. Assume tools are pre-installed
**Your Preference:** [ask user how to handle installation]"
### 6. Menu Options
Display: **Select an Option:** [C] Continue to Installation Guidance [M] Modify External Tools
#### Menu Handling Logic:
- IF C: Append external tools configuration to {workflowPlanFile}, update frontmatter, then load {nextStepFile}
- IF M: Refine external tool requirements
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN C is selected and external tools are documented will you load {nextStepFile} to configure installation guidance.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- External tools presented from CSV with installation requirements
- User's specific tool needs identified and documented
- Installation requirements clearly marked
- User understands which tools need setup
### ❌ SYSTEM FAILURE:
- Not filtering CSV for relevant tool types
- Missing installation requirement information
- Proceeding without confirming tool selections

View File

@ -1,36 +1,32 @@
---
name: 'step-11-build'
name: 'step-07-build'
description: 'Generate all workflow files based on the approved plan'
# Path Definitions
workflow_path: '{project-root}/{bmad_folder}/bmb/workflows/create-workflow'
# File References
thisStepFile: '{workflow_path}/steps/step-11-build.md'
nextStepFile: '{workflow_path}/steps/step-12-review.md'
thisStepFile: '{workflow_path}/steps/step-07-build.md'
nextStepFile: '{workflow_path}/steps/step-08-review.md'
workflowFile: '{workflow_path}/workflow.md'
# Output files for workflow creation process
workflowPlanFile: '{output_folder}/workflow-plan-{new_workflow_name}.md'
targetWorkflowPath: '{custom_workflow_location}/{new_workflow_name}'
# Task References
advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
# Template References
workflowTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/templates/workflow-template.md'
stepTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/templates/step-template.md'
stepInitContinuableTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/templates/step-01-init-continuable-template.md'
step1bTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/templates/step-1b-template.md'
contentTemplate: '{workflow_path}/templates/content-template.md'
buildSummaryTemplate: '{workflow_path}/templates/build-summary.md'
# No content templates needed - will create content as needed during build
# No build summary template needed - will append summary directly to workflow plan
---
# Step 5: Workflow File Generation
# Step 7: Workflow File Generation
## STEP GOAL:
To generate all the workflow files (workflow.md, step files, templates, and supporting files) based on the approved plan from the previous review step.
To generate all the workflow files (workflow.md, step files, templates, and supporting files) based on the approved plan from the previous design step.
## MANDATORY EXECUTION RULES (READ FIRST):
@ -60,12 +56,12 @@ To generate all the workflow files (workflow.md, step files, templates, and supp
- 🎯 Generate files systematically from design
- 💾 Document all generated files and their locations
- 📖 Update frontmatter `stepsCompleted: [1, 2, 3, 4]` before loading next step
- 📖 Update frontmatter `stepsCompleted: [1, 2, 3, 4, 5, 6, 7]` before loading next step
- 🚫 FORBIDDEN to load next step until user selects 'C' and build is complete
## CONTEXT BOUNDARIES:
- Approved plan from step 10 guides implementation
- Approved plan from step 6 guides implementation
- Generate files in target workflow location
- Load templates and documentation as needed during build
- Follow step-file architecture principles
@ -121,7 +117,7 @@ Load and follow {workflowTemplate}:
- Create workflow.md using template structure
- Insert workflow name and description
- Configure all path variables ({project-root}, {bmad_folder}, {workflow_path})
- Configure all path variables ({project-root}, {_bmad_folder_}, {workflow_path})
- Set web_bundle flag to true unless user has indicated otherwise
- Define role and goal
- Include initialization path to step-01
@ -182,7 +178,6 @@ For each remaining step in the design:
For document workflows:
- Load {contentTemplate}
- Create template.md with proper structure
- Include all variables from design
- Ensure variable naming consistency
@ -265,7 +260,12 @@ Create a summary of what was generated:
After generating all files, append to {workflowPlanFile}:
Load and append the content from {buildSummaryTemplate}
Create a build summary including:
- List of all files created with full paths
- Any customizations from templates
- Manual steps needed
- Next steps for testing
### 9. Present MENU OPTIONS

View File

@ -1,159 +0,0 @@
---
name: 'step-07-installation-guidance'
description: 'Configure installation guidance for tools that require setup'
# Path Definitions
workflow_path: '{project-root}/{bmad_folder}/bmb/workflows/create-workflow'
# File References
thisStepFile: '{workflow_path}/steps/step-07-installation-guidance.md'
nextStepFile: '{workflow_path}/steps/step-08-tools-summary.md'
workflowFile: '{workflow_path}/workflow.md'
workflowPlanFile: '{output_folder}/workflow-plan-{new_workflow_name}.md'
# Documentation References
commonToolsCsv: '{project-root}/{bmad_folder}/bmb/docs/workflows/common-workflow-tools.csv'
---
# Step 7: Installation Guidance Configuration
## STEP GOAL:
Configure installation guidance for any selected tools that require setup, ensuring users can successfully prepare their environment.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read the complete step file before taking any action
- 📋 YOU ARE A FACILITATOR, not a content generator
### Role Reinforcement:
- ✅ You are a workflow architect and integration specialist
- ✅ We engage in collaborative dialogue, not command-response
- ✅ You bring expertise in tool installation and setup procedures
## EXECUTION PROTOCOLS:
- 🎯 Identify tools requiring installation from CSV
- 💾 Configure installation approach based on user preference
- 📖 Generate or skip installation guidance as appropriate
- 🚫 FORBIDDEN to proceed without confirming installation approach
## SEQUENCE OF INSTRUCTIONS:
### 1. Initialize Installation Guidance
"Configuring **Installation Guidance**
Let's ensure users can successfully set up any tools your workflow requires. This prevents runtime errors and improves user experience."
### 2. Identify Installation Requirements
Load `{commonToolsCsv}` and filter for selected tools with `requires_install=yes`:
"**Installation Requirements:**
**Tools Requiring Installation:**
- [List selected tools from CSV where requires_install=yes]
- [Include URLs from CSV for each tool]
**No Installation Required:**
- [List selected tools from CSV where requires_install=no]
- All BMAD core tools, LLM features, and sidecar file memory"
### 3. Installation Approach Options
"**Installation Guidance Options:**
Based on your selected tools, how should the workflow handle installation?
1. **Include Installation Steps** - Add detailed setup instructions in early workflow step
2. **User Instructions Only** - Provide guidance but don't embed in workflow
3. **Assume Pre-Installed** - Skip installation guidance (advanced users)
**Installation Prerequisites (if included):**
- Node.js 18+ (for Node.js-based MCPs)
- Python 3.8+ (for Python-based MCPs)
- Git for cloning repositories
- MCP-compatible AI client (Claude Desktop or similar)"
### 4. Configure Installation Guidance
If user chooses installation guidance:
"**Installation Step Configuration:**
For each tool requiring installation, the workflow will include:
- Clone/download instructions using URL from CSV
- Dependency installation commands
- Configuration file setup
- Server startup procedures
- Claude Desktop configuration steps
**Installation Checklist (if included):**
- [ ] Download and install Claude Desktop
- [ ] Clone MCP repositories
- [ ] Install required dependencies
- [ ] Configure MCP servers
- [ ] Add to Claude configuration
- [ ] Test connectivity
- [ ] Verify functionality"
### 5. Document Installation Configuration
Append to {workflowPlanFile}:
```markdown
## Installation Guidance Configuration
### Installation Approach
**Selected Approach:** [detailed steps/user instructions/assume pre-installed]
**Tools Requiring Installation:** [list with URLs]
**Installation Step Placement:** [early in workflow, after setup]
### Installation Content
**Prerequisites:** [system requirements]
**Setup Steps:** [commands and procedures]
**Verification:** [testing procedures]
**User Support:** [troubleshooting guidance]
```
### 6. Menu Options
Display: **Select an Option:** [C] Continue to Tools Summary [M] Modify Installation Approach
#### Menu Handling Logic:
- IF C: Append installation configuration to {workflowPlanFile}, update frontmatter, then load {nextStepFile}
- IF M: Refine installation approach
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN C is selected and installation guidance is documented will you load {nextStepFile} to complete tools configuration.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Installation requirements clearly identified from CSV
- Installation approach configured based on user preference
- Documentation prepared for setup procedures
- User understands how tools will be installed
### ❌ SYSTEM FAILURE:
- Missing installation requirement assessment
- Not using URLs from CSV for installation guidance
- Proceeding without confirming installation approach

View File

@ -1,27 +1,31 @@
---
name: 'step-12-review'
name: 'step-08-review'
description: 'Review the generated workflow and provide final validation and next steps'
# Path Definitions
workflow_path: '{project-root}/{bmad_folder}/bmb/workflows/create-workflow'
# File References
thisStepFile: '{workflow_path}/steps/step-12-review.md'
thisStepFile: '{workflow_path}/steps/step-08-review.md'
workflowFile: '{workflow_path}/workflow.md'
# Output files for workflow creation process
workflowPlanFile: '{output_folder}/workflow-plan-{new_workflow_name}.md'
targetWorkflowPath: '{custom_workflow_location}/{new_workflow_name}'
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
# Task References
advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
# Template References
reviewTemplate: '{workflow_path}/templates/review-section.md'
completionTemplate: '{workflow_path}/templates/completion-section.md'
# No review template needed - will append review summary directly to workflow plan
# No completion template needed - will append completion details directly
# Next step reference
nextStepFile: '{workflow_path}/steps/step-09-complete.md'
---
# Step 6: Workflow Review and Completion
# Step 8: Workflow Review and Completion
## STEP GOAL:
@ -55,7 +59,7 @@ To review the generated workflow for completeness, accuracy, and adherence to be
- 🎯 Conduct thorough review of generated workflow
- 💾 Document review findings and completion status
- 📖 Update frontmatter `stepsCompleted: [1, 2, 3, 4, 5]` and mark complete
- 📖 Update frontmatter `stepsCompleted: [1, 2, 3, 4, 5, 6, 7, 8]` and mark complete
- 🚫 This is the final step - no next step to load
## CONTEXT BOUNDARIES:
@ -197,26 +201,36 @@ Provide specific recommendations:
After completing review, append to {workflowPlanFile}:
Load and append the content from {reviewTemplate}
Append review findings to {workflowPlanFile}:
Then load and append the content from {completionTemplate}
Create a review summary including:
## FINAL MENU OPTIONS
- Completeness check results
- Accuracy validation
- Compliance with best practices
- Any issues found
Display: **All Files Created Successfully!** [C] Complete & Get Validation Instructions
Then append completion details:
- Final approval status
- Deployment recommendations
- Usage guidance
### 10. Present MENU OPTIONS
Display: **Select an Option:** [C] Continue to Completion
#### EXECUTION RULES:
- ALWAYS halt and wait for user input after presenting menu
- Provide compliance check guidance for new context execution
- After other menu items execution, return to this menu
- ONLY proceed to next step when user selects 'C'
- User can chat or ask questions - always respond and then end with display again of the menu options
- Use menu handling logic section below
#### Menu Handling Logic:
- IF C: Save content to {workflowPlanFile}, update frontmatter, then provide validation instructions for running in new context
- IF Any other comments or queries: respond and redisplay menu
- IF C: Save review to {workflowPlanFile}, update frontmatter, then load, read entire file, then execute {nextStepFile}
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#10-present-menu-options)
## COMPLIANCE CHECK INSTRUCTIONS

View File

@ -1,167 +0,0 @@
---
name: 'step-08-tools-summary'
description: 'Summarize tools configuration and proceed to workflow design'
# Path Definitions
workflow_path: '{project-root}/{bmad_folder}/bmb/workflows/create-workflow'
# File References
thisStepFile: '{workflow_path}/steps/step-08-tools-summary.md'
nextStepFile: '{workflow_path}/steps/step-09-design.md'
workflowFile: '{workflow_path}/workflow.md'
workflowPlanFile: '{output_folder}/workflow-plan-{new_workflow_name}.md'
# Documentation References
commonToolsCsv: '{project-root}/{bmad_folder}/bmb/docs/workflows/common-workflow-tools.csv'
---
# Step 8: Tools Configuration Summary
## STEP GOAL:
Summarize the complete tools configuration and confirm readiness to proceed to workflow design.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read the complete step file before taking any action
- 📋 YOU ARE A FACILITATOR, not a content generator
### Role Reinforcement:
- ✅ You are a workflow architect and integration specialist
- ✅ We engage in collaborative dialogue, not command-response
- ✅ You bring expertise in tools integration and workflow optimization
## EXECUTION PROTOCOLS:
- 🎯 Compile complete tools configuration summary
- 💾 Present final configuration for user confirmation
- 📖 Update workflow plan with comprehensive summary
- 🚫 FORBIDDEN to proceed to design without user confirmation
## SEQUENCE OF INSTRUCTIONS:
### 1. Initialize Tools Summary
"**Tools Configuration Summary**
Let's review your complete tools configuration before proceeding to workflow design. This ensures all integrations are properly planned."
### 2. Present Complete Configuration
Load all previous configurations from {workflowPlanFile} and CSV:
"**Complete Tools Configuration:**
**Core BMAD Tools:**
- [List selected core tools with integration points]
- [Load descriptions from CSV for confirmation]
**LLM Tool Features:**
- [List selected LLM features with integration points]
- [Load descriptions from CSV for confirmation]
**Tool-Memory:**
- [Selected memory types with implementation details]
- [Load descriptions from CSV for confirmation]
**External Tools:**
- [List selected MCP integrations with URLs]
- [Load descriptions from CSV for confirmation]
- [Mark which require installation]
**Installation Guidance:**
- [Approach selected and tools included]
- [Setup steps configured as needed]
**Integration Strategy:**
- [How tools enhance rather than disrupt workflow]
- [Checkpoint approaches and user choice points]
- [Performance optimization opportunities]"
### 3. Final Configuration Confirmation
"**Final Configuration Review:**
**Your workflow will include:**
- **Total Tools:** [count of selected tools]
- **Core Tools:** [number selected]
- **External Tools:** [number selected]
- **Installation Required:** [yes/no, which tools]
**Key Integration Points:**
- [Major phases where tools enhance workflow]
- [User experience considerations]
- [Performance optimizations]
**Ready to proceed with this configuration?**"
### 4. Update Workflow Plan with Final Summary
Append to {workflowPlanFile}:
```markdown
## Final Tools Configuration Summary
### Tools Inventory
**Core BMAD Tools:** [count and list]
**LLM Features:** [count and list]
**Memory Implementation:** [type and use case]
**External Tools:** [count and list with URLs]
**Installation Required:** [tools and setup complexity]
### Integration Strategy
**User Experience:** [how tools enhance workflow]
**Checkpoint Approach:** [when tools are offered]
**Performance Optimization:** [efficiency improvements]
**Installation Strategy:** [how users prepare environment]
### Ready for Design
All tools configured and ready for workflow design phase.
```
### 5. Menu Options
Display: **Select an Option:** [C] Continue to Workflow Design [M] Modify Configuration
#### Menu Handling Logic:
- IF C: Save final summary, update frontmatter stepsCompleted: [3, 4, 5, 6, 7, 8], then load {nextStepFile}
- IF M: Return to specific configuration step
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN C is selected and summary is saved will you load {nextStepFile} to begin workflow design phase.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Complete tools configuration summarized clearly
- All descriptions loaded from CSV (not duplicated)
- User confirms configuration before proceeding
- Frontmatter updated with completed steps
- Ready to proceed to workflow design
### ❌ SYSTEM FAILURE:
- Not presenting complete configuration summary
- Duplicating CSV content instead of referencing it
- Proceeding to design without user confirmation
- Not updating workflow plan with final summary

View File

@ -0,0 +1,187 @@
---
name: 'step-09-complete'
description: 'Final completion and wrap-up of workflow creation process'
# Path Definitions
workflow_path: '{project-root}/{bmad_folder}/bmb/workflows/create-workflow'
# File References
thisStepFile: '{workflow_path}/steps/step-09-complete.md'
workflowFile: '{workflow_path}/workflow.md'
# Output files for workflow creation process
targetWorkflowPath: '{custom_workflow_location}/{new_workflow_name}'
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
completionFile: '{targetWorkflowPath}/completion-summary-{new_workflow_name}.md'
---
# Step 9: Workflow Creation Complete
## STEP GOAL:
To complete the workflow creation process with a final summary, confirmation, and next steps for using the new workflow.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read the complete step file before taking any action
- 📋 YOU ARE A FACILITATOR, not a content generator
### Role Reinforcement:
- ✅ You are a workflow architect and systems designer
- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role
- ✅ We engage in collaborative dialogue, not command-response
- ✅ You bring expertise in workflow deployment and usage guidance
- ✅ User brings their specific workflow needs
### Step-Specific Rules:
- 🎯 Focus ONLY on completion and next steps
- 🚫 FORBIDDEN to modify the generated workflow
- 💬 Provide clear guidance on how to use the workflow
- 🚫 This is the final step - no next step to load
## EXECUTION PROTOCOLS:
- 🎯 Present completion summary
- 💾 Create final completion documentation
- 📖 Update plan frontmatter with completion status
- 🚫 This is the final step
## CONTEXT BOUNDARIES:
- All previous steps are complete
- Workflow has been generated and reviewed
- Focus ONLY on completion and next steps
- This step concludes the create-workflow process
## COMPLETION PROCESS:
### 1. Initialize Completion
"**Workflow Creation Complete!**
Congratulations! We've successfully created your new workflow. Let's finalize everything and ensure you have everything you need to start using it."
### 2. Final Summary
Present a complete summary of what was created:
**Workflow Created:** {new_workflow_name}
**Location:** {targetWorkflowPath}
**Files Generated:** [list from build step]
### 3. Create Completion Summary
Create {completionFile} with:
```markdown
---
workflowName: { new_workflow_name }
creationDate: [current date]
module: [module from plan]
status: COMPLETE
stepsCompleted: [1, 2, 3, 4, 5, 6, 7, 8, 9]
---
# Workflow Creation Summary
## Workflow Information
- **Name:** {new_workflow_name}
- **Module:** [module]
- **Created:** [date]
- **Location:** {targetWorkflowPath}
## Generated Files
[List all files created]
## Quick Start Guide
[How to run the new workflow]
## Next Steps
[Post-creation recommendations]
```
### 4. Usage Guidance
Provide clear instructions on how to use the new workflow:
**How to Use Your New Workflow:**
1. **Running the Workflow:**
- [Instructions based on workflow type]
- [Initial setup if needed]
2. **Common Use Cases:**
- [Typical scenarios for using the workflow]
- [Expected inputs and outputs]
3. **Tips for Success:**
- [Best practices for this specific workflow]
- [Common pitfalls to avoid]
### 5. Post-Creation Recommendations
"**Next Steps:**
1. **Test the Workflow:** Run it with sample data to ensure it works as expected
2. **Customize if Needed:** You can modify the workflow based on your specific needs
3. **Share with Team:** If others will use this workflow, provide them with the location and instructions
4. **Monitor Usage:** Keep track of how well the workflow meets your needs"
### 6. Final Confirmation
"**Is there anything else you need help with regarding your new workflow?**
- I can help you test it
- We can make adjustments if needed
- I can help you create documentation for users
- Or any other support you need"
### 7. Update Final Status
Update {workflowPlanFile} frontmatter:
- Set status to COMPLETE
- Set completion date
- Add stepsCompleted: [1, 2, 3, 4, 5, 6, 7, 8, 9]
## MENU OPTIONS
Display: **Workflow Creation Complete!** [T] Test Workflow [M] Make Adjustments [D] Get Help
#### Menu Handling Logic:
- IF T: Offer to run the newly created workflow with sample data
- IF M: Offer to make specific adjustments to the workflow
- IF D: Provide additional help and resources
- IF Any other: Respond to user needs
## CRITICAL STEP COMPLETION NOTE
This is the final step. When the user is satisfied, the workflow creation process is complete.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Workflow fully created and reviewed
- Completion summary generated
- User understands how to use the workflow
- All documentation is in place
### ❌ SYSTEM FAILURE:
- Not providing clear usage instructions
- Not creating completion summary
- Leaving user without next steps
**Master Rule:** Ensure the user has everything needed to successfully use their new workflow.

View File

@ -1,215 +0,0 @@
---
name: 'step-10-plan-review'
description: 'Review the complete workflow plan before generating files'
# Path Definitions
workflow_path: '{project-root}/{bmad_folder}/bmb/workflows/create-workflow'
# File References
thisStepFile: '{workflow_path}/steps/step-10-plan-review.md'
nextStepFile: '{workflow_path}/steps/step-11-build.md'
workflowFile: '{workflow_path}/workflow.md'
# Output files for workflow creation process
workflowPlanFile: '{output_folder}/workflow-plan-{new_workflow_name}.md'
targetWorkflowPath: '{custom_workflow_location}/{new_workflow_name}'
# Task References
advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
---
# Step 4: Workflow Plan Review
## STEP GOAL:
To present the complete workflow plan for user review and approval before generating the actual workflow files.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: Always read the complete step file before taking any action
- 📋 YOU ARE A FACILITATOR, not a content generator
### Role Reinforcement:
- ✅ You are a workflow architect and systems designer
- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role
- ✅ We engage in collaborative dialogue, not command-response
- ✅ You present the plan clearly and answer questions
- ✅ User provides approval or requests changes
### Step-Specific Rules:
- 🎯 Focus ONLY on reviewing the plan, not building yet
- 🚫 FORBIDDEN to generate any workflow files in this step
- 💬 Present the complete plan clearly and answer all questions
- 🚪 GET explicit approval before proceeding to build
## EXECUTION PROTOCOLS:
- 🎯 Present the complete workflow plan for review
- 💾 Update plan frontmatter with review status
- 📖 Only proceed to build step with explicit user approval
- 🚫 FORBIDDEN to skip review or proceed without consent
## CONTEXT BOUNDARIES:
- Requirements and design from previous steps are in the plan
- Focus ONLY on review and approval
- Don't modify the design significantly here
- This is the final checkpoint before file generation
## REVIEW REFERENCE MATERIALS:
When reviewing, you may load for comparison:
- Example workflow: `{project-root}/{bmad_folder}/bmb/reference/workflows/meal-prep-nutrition/workflow.md`
- Step examples from same workflow's steps folder
- Architecture guide: `{project-root}/{bmad_folder}/bmb/docs/workflows/architecture.md`
## PLAN REVIEW PROCESS:
### 1. Present the Complete Plan
Read the entire {workflowPlanFile} and present it to the user:
- Executive Summary
- Requirements Analysis
- Detailed Design
- Implementation Plan
- Target Location and file structure
### 2. Analyze Plan for Gaps and Issues
Perform systematic analysis of the loaded plan:
**Logical Flow Check:**
- Do requirements align with proposed solution?
- Are tools appropriate for the workflow type?
- Is step sequence logical and complete?
- Are there missing transitions between steps?
**Completeness Review:**
- All requirements captured and addressed?
- Design covers all user scenarios?
- Implementation plan includes all necessary files?
- Are there unclear or ambiguous specifications?
**Architecture Validation:**
- Follows BMAD step-file architecture?
- Proper use of template patterns?
- Menu flow is logical and complete?
- Variable naming is consistent?
**Issue Identification:**
If gaps or issues found:
- Clearly identify each issue
- Propose specific solutions
- Ask for user input on resolution approach
### 3. Present Menu for Plan Approval
Display: **Plan Review Complete - Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue to Build
### 4. Address Questions and Concerns
Ask for specific feedback:
- Does this plan fully address your requirements?
- Are there any missing aspects?
- Would you like any changes to the design?
- Are you satisfied with the proposed structure?
### 5. Confirm or Revise
Based on feedback:
- If approved: Proceed to build step
- If changes needed: Go back to design step with specific feedback
- If major revisions: Consider going back to requirements step
## REVIEW CHECKPOINTS:
### Requirements Coverage
- [ ] All user requirements addressed
- [ ] Success criteria defined
- [ ] Technical constraints considered
- [ ] User interaction level appropriate
### Design Quality
- [ ] Step flow is logical
- [ ] Instruction style chosen appropriately
- [ ] Menu systems designed properly
- [ ] Error handling included
### Implementation Feasibility
- [ ] File structure is clear
- [ ] Target location confirmed
- [ ] Templates identified correctly
- [ ] Dependencies documented
## PLAN APPROVAL:
### Explicit Confirmation Required
Before proceeding to build, get explicit confirmation:
"Based on this plan, I will generate:
- [List of files]
in [target location]"
Ready to proceed when you are! Select your option below to build or modify the plan.
### 6. Present MENU OPTIONS
Display: **Review Complete - Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue to Build
#### EXECUTION RULES:
- ALWAYS halt and wait for user input after presenting menu
- ONLY proceed to build step with explicit 'C' selection AND approval
- After other menu items execution, return to this menu
- User can chat or ask questions - always respond and then end with display again of the menu options
- Use menu handling logic section below
#### Menu Handling Logic:
- IF A: Execute {advancedElicitationTask}
- IF P: Execute {partyModeWorkflow}
- IF C: AND user has approved the plan, update plan frontmatter, then load, read entire file, then execute {nextStepFile}
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#6-present-menu-options)
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN C is selected AND user has explicitly approved the plan, will you then update the plan frontmatter and load, read entire file, then execute {nextStepFile} to execute and begin workflow file generation step.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Complete plan presented clearly
- All user questions answered
- Feedback collected and documented
- Explicit approval received (or revisions planned)
- Plan ready for implementation
### ❌ SYSTEM FAILURE:
- Skipping the review presentation
- Proceeding without explicit approval
- Not answering user questions
- Rushing through the review process
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.

View File

@ -1,36 +0,0 @@
## Build Summary
### Files Generated
{{#generatedFiles}}
- **{{type}}**: {{path}}
{{/generatedFiles}}
### Customizations Made
{{#customizations}}
- {{.}}
{{/customizations}}
### Manual Steps Required
{{#manualSteps}}
- {{.}}
{{/manualSteps}}
### Build Validation Results
- **Syntax Check**: {{syntaxCheckResult}}
- **Path Validation**: {{pathValidationResult}}
- **Variable Consistency**: {{variableConsistencyResult}}
- **Template Compliance**: {{templateComplianceResult}}
### Next Steps for Testing
1. Run `workflow {{targetModule}}/workflows/{{workflowName}}` to test
2. Verify all steps execute properly
3. Check output generation
4. Validate user interaction points

View File

@ -1,39 +0,0 @@
## Workflow Creation Complete!
### Final Deliverables
**Main Workflow**: {{targetWorkflowPath}}/workflow.md
**Step Files**: {{stepCount}} step files created
**Templates**: {{templateCount}} templates created
**Documentation**: Complete documentation provided
### Deployment Instructions
1. **Installation**: Run the BMAD Method installer to your project location
2. **Compilation**: Select 'Compile Agents' after confirming the folder
3. **Testing**: Use `workflow {{targetWorkflowPath}}` to test
### Usage Guide
```bash
# To invoke the workflow (from custom location)
workflow {{customWorkflowLocation}}/{{workflowName}}
# Or if standalone is true
/{{workflowCommand}}
```
### Support
- Created by: {{user_name}}
- Date: {{completionDate}}
- Module: {{targetModule}}
- Type: {{workflowType}}
### Thank You!
Thank you for using the Standalone Workflow Builder. Your workflow has been created following best practices for step-file architecture and collaborative design principles.
---
_Workflow creation completed successfully on {{completionDate}}_

View File

@ -1,21 +0,0 @@
# {{documentTitle}}
**Created:** {{date}}
**Author:** {{user_name}}
**Workflow:** {{workflowName}}
## Executive Summary
{{executiveSummary}}
## Details
{{mainContent}}
## Conclusion
{{conclusion}}
---
_Generated by the {{workflowName}} workflow_

View File

@ -1,53 +0,0 @@
## Workflow Design
### Step Structure
**Total Steps**: {{totalSteps}}
**Step Overview**:
{{stepOverview}}
### Detailed Step Plan
{{stepDetails}}
### Interaction Design
- **Menu Pattern**: {{menuPattern}}
- **User Input Points**: {{userInputPoints}}
- **AI Autonomy Level**: {{aiAutonomyLevel}}
- **Decision Flow**: {{decisionFlow}}
### Data Flow Architecture
- **Input Requirements**: {{dataInputRequirements}}
- **Intermediate Variables**: {{intermediateVariables}}
- **Output Mapping**: {{outputMapping}}
- **State Management**: {{stateManagement}}
### File Organization
- **Core Files**: {{coreFiles}}
- **Templates**: {{templates}}
- **Data Files**: {{dataFiles}}
- **Supporting Files**: {{supportingFiles}}
### AI Role Definition
- **Primary Role**: {{primaryRole}}
- **Expertise Areas**: {{expertiseAreas}}
- **Communication Style**: {{communicationStyle}}
- **Collaboration Approach**: {{collaborationApproach}}
### Quality Assurance
- **Validation Points**: {{validationPoints}}
- **Error Handling**: {{errorHandling}}
- **Recovery Strategies**: {{recoveryStrategies}}
- **Success Criteria**: {{designSuccessCriteria}}
### Special Features
- **Conditional Logic**: {{conditionalLogic}}
- **Branch Points**: {{branchPoints}}
- **Integrations**: {{designIntegrations}}
- **Multi-Scenario Support**: {{multiScenarioSupport}}

View File

@ -1,18 +0,0 @@
# Workflow Creation: {{workflow_name}}
**Created:** {{date}}
**Author:** {{user_name}}
**Module:** {{targetModule}}
**Type:** {{workflowType}}
## Project Overview
{{projectOverview}}
## Requirements Collected
{{requirementsCollected}}
---
_This document tracks the workflow creation process. The final workflow will be generated separately._

View File

@ -1,47 +0,0 @@
## Requirements Summary
### Workflow Purpose
- **Problem to Solve**: {{problemStatement}}
- **Primary Users**: {{targetUsers}}
- **Main Outcome**: {{primaryOutcome}}
- **Usage Frequency**: {{usageFrequency}}
### Workflow Classification
- **Type**: {{workflowType}}
- **Flow Pattern**: {{flowPattern}}
- **Interaction Style**: {{interactionStyle}}
- **Instruction Style**: {{instructionStyle}}
- **Autonomy Level**: {{autonomyLevel}}
### Input Requirements
- **Required Inputs**: {{requiredInputs}}
- **Optional Inputs**: {{optionalInputs}}
- **Prerequisites**: {{prerequisites}}
### Output Specifications
- **Primary Output**: {{primaryOutput}}
- **Intermediate Outputs**: {{intermediateOutputs}}
- **Output Format**: {{outputFormat}}
### Technical Constraints
- **Dependencies**: {{dependencies}}
- **Integrations**: {{integrations}}
- **Performance Requirements**: {{performanceRequirements}}
### Target Location
- **Module**: {{targetModule}}
- **Folder Name**: {{workflowFolderName}}
- **Target Path**: {{targetWorkflowPath}}
- **Custom Workflow Location**: {{customWorkflowLocation}}
### Success Criteria
- **Quality Metrics**: {{qualityMetrics}}
- **Success Indicators**: {{successIndicators}}
- **User Satisfaction**: {{userSatisfactionCriteria}}

View File

@ -1,56 +0,0 @@
## Workflow Review Results
### File Structure Review
**Status**: {{fileStructureStatus}}
- Required Files: {{requiredFilesStatus}}
- Directory Structure: {{directoryStructureStatus}}
- Naming Conventions: {{namingConventionsStatus}}
### Configuration Validation
**Status**: {{configValidationStatus}}
- Metadata Completeness: {{metadataStatus}}
- Path Variables: {{pathVariablesStatus}}
- Dependencies: {{dependenciesStatus}}
### Step File Compliance
**Status**: {{stepComplianceStatus}}
- Template Structure: {{templateStructureStatus}}
- Mandatory Rules: {{mandatoryRulesStatus}}
- Menu Implementation: {{menuImplementationStatus}}
### Cross-File Consistency
**Status**: {{consistencyStatus}}
- Variable Naming: {{variableNamingStatus}}
- Path References: {{pathReferencesStatus}}
- Step Sequence: {{stepSequenceStatus}}
### Requirements Verification
**Status**: {{requirementsVerificationStatus}}
- Problem Addressed: {{problemAddressedStatus}}
- User Types Supported: {{userTypesStatus}}
- Inputs/Outputs: {{inputsOutputsStatus}}
### Best Practices Adherence
**Status**: {{bestPracticesStatus}}
- File Size Limits: {{fileSizeStatus}}
- Collaborative Dialogue: {{collaborativeDialogueStatus}}
- Error Handling: {{errorHandlingStatus}}
### Issues Found
{{#issues}}
- **{{severity}}**: {{description}}
{{/issues}}

View File

@ -1,54 +0,0 @@
# Workflow Creation Plan: {{workflowName}}
**Created:** {{date}}
**Author:** {{user_name}}
**Module:** {{targetModule}}
**Type:** {{workflowType}}
## Executive Summary
{{executiveSummary}}
## Requirements Analysis
[Requirements will be appended here from step 2]
## Detailed Design
[Design details will be appended here from step 3]
## Implementation Plan
[Implementation plan will be appended here from step 4]
## Review and Validation
[Review results will be appended here from step 5]
---
## Final Configuration
### Output Files to Generate
{{#outputFiles}}
- {{type}}: {{path}}
{{/outputFiles}}
### Target Location
- **Folder**: {{targetWorkflowPath}}
- **Module**: {{targetModule}}
- **Custom Location**: {{customWorkflowLocation}}
### Final Checklist
- [ ] All requirements documented
- [ ] Workflow designed and approved
- [ ] Files generated successfully
- [ ] Workflow tested and validated
## Ready for Implementation
When you approve this plan, I'll generate all the workflow files in the specified location with the exact structure and content outlined above.

View File

@ -1,5 +1,5 @@
---
name: Create Workflow
name: create-workflow
description: Create structured standalone workflows using markdown-based step architecture
web_bundle: true
---

View File

@ -1,5 +1,5 @@
---
name: Edit Agent
name: edit-agent
description: Edit existing BMAD agents while following all best practices and conventions
web_bundle: false
---

View File

@ -1,5 +1,5 @@
---
name: Edit Workflow
name: edit-workflow
description: Intelligent workflow editor that helps modify existing workflows while following best practices
web_bundle: true
---

View File

@ -132,10 +132,10 @@ For each deviation:
"**Initialization Validation:**"
- Configuration Loading uses correct path format: `{project-root}/{bmad_folder}/[module]/config.yaml` (variable substitution pattern)
- Configuration Loading uses correct path format: `{project-root}/{*bmad_folder*}/[module]/config.yaml` (variable substitution pattern)
- First step follows pattern: `step-01-init.md` OR documented deviation
- Required config variables properly listed
- Variables use proper substitution pattern: {project-root}, {bmad_folder}, {workflow_path}, etc.
- Variables use proper substitution pattern: {project-root}, {_bmad_folder_}, {workflow_path}, etc.
For violations:
@ -198,7 +198,7 @@ Append to {complianceReportFile}:
"**Phase 1 Complete:** Workflow.md validation finished with detailed violation analysis.
**Ready for Phase 2:** Step-by-step validation against step-template.md
**Ready for Phase 3:** Step-by-step validation against step-template.md
This will check each step file for:

View File

@ -138,8 +138,8 @@ Check for proper references:
```yaml
# Task References
advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
advancedElicitationTask: '{project-root}/{*bmad_folder*}/core/tasks/advanced-elicitation.xml'
partyModeWorkflow: '{project-root}/{*bmad_folder*}/core/workflows/party-mode/workflow.md'
```
**Violations to document:**
@ -186,7 +186,7 @@ For each step:
"**Path Variable Validation:**"
- Check format: `{project-root}/{bmad_folder}/bmb/...` vs `{project-root}/src/modules/bmb/...`
- Check format: `{project-root}/{*bmad_folder*}/bmb/...` vs `{project-root}/src/modules/bmb/...`
- Ensure consistent variable usage across all step files
- Validate relative vs absolute path usage
@ -232,13 +232,13 @@ For each step file with violations:
2. [Second most frequent]
3. [Third most frequent]
**Ready for Phase 3:** Holistic workflow analysis
**Ready for Phase 4:** File Validation workflow analysis
- Flow optimization assessment
- Goal alignment verification
- Meta-workflow failure analysis
**Select an Option:** [C] Continue to Holistic Analysis [X] Exit"
**Select an Option:** [C] Continue to File Validation [X] Exit"
## Menu Handling Logic:

View File

@ -253,7 +253,7 @@ For each file with issues:
- **Formatting Standards:** [summary of markdown compliance issues]
- **Data Validation:** [summary of CSV standards compliance]
**Ready for Phase 5:** Holistic workflow analysis
**Ready for Phase 5:** Intent Spectrum Validation analysis
- Flow validation and goal alignment
- Meta-workflow failure analysis

View File

@ -222,7 +222,7 @@ Append to {complianceReportFile}:
- **User Understanding:** Confirmed implications and benefits
- **Implementation Ready:** Guidance provided for maintaining position
**Ready for Phase 6:** Holistic workflow analysis
**Ready for Phase 6:** Web Subprocess Validation analysis
- Flow validation and completion paths
- Goal alignment and optimization assessment

View File

@ -315,7 +315,7 @@ Append to {complianceReportFile}:
- **Performance Impact:** [expected efficiency gains]
- **User Experience Benefits:** [specific improvements]
**Ready for Phase 6:** Holistic workflow analysis
**Ready for Phase 7:** Holistic workflow analysis
- Flow validation and completion paths
- Goal alignment with optimized resources

View File

@ -215,7 +215,7 @@ Evaluate workflow from user perspective:
- **Optimization Opportunities:** [number key improvements identified]
- **Meta-Workflow Failures:** [number issues that should have been prevented]
**Ready for Phase 6:** Comprehensive compliance report generation
**Ready for Phase 8:** Comprehensive compliance report generation
- All findings compiled into structured report
- Severity-ranked violation list

View File

@ -1,5 +1,5 @@
---
name: Workflow Compliance Check
name: workflow-compliance-check
description: Systematic validation of workflows against BMAD standards with adversarial analysis and detailed reporting
web_bundle: false
---

View File

@ -26,12 +26,8 @@ agent:
exec: "{project-root}/{bmad_folder}/bmm/workflows/3-solutioning/architecture/workflow.md"
description: Create an Architecture Document to Guide Development of a PRD (required for BMad Method projects)
- trigger: validate-architecture
validate-workflow: "{project-root}/{bmad_folder}/bmm/workflows/3-solutioning/architecture/workflow.yaml"
description: Validate Architecture Document (Recommended, use another LLM and fresh context for best results)
- trigger: implementation-readiness
workflow: "{project-root}/{bmad_folder}/bmm/workflows/3-solutioning/implementation-readiness/workflow.yaml"
exec: "{project-root}/{bmad_folder}/bmm/workflows/3-solutioning/implementation-readiness/workflow.md"
description: Validate PRD, UX, Architecture, Epics and stories aligned (Optional but recommended before development)
- trigger: create-excalidraw-diagram

View File

@ -27,14 +27,14 @@ agent:
exec: "{project-root}/{bmad_folder}/bmm/workflows/2-plan-workflows/prd/workflow.md"
description: Create Product Requirements Document (PRD) (Required for BMad Method flow)
- trigger: validate-prd
validate-workflow: "{project-root}/{bmad_folder}/bmm/workflows/2-plan-workflows/prd/workflow.yaml"
description: Validate PRD (Highly Recommended, use fresh context and different LLM for best results)
- trigger: create-epics-and-stories
workflow: "{project-root}/{bmad_folder}/bmm/workflows/3-solutioning/create-epics-and-stories/workflow.yaml"
exec: "{project-root}/{bmad_folder}/bmm/workflows/3-solutioning/create-epics-and-stories/workflow.md"
description: Create Epics and User Stories from PRD (Required for BMad Method flow AFTER the Architecture is completed)
- trigger: implementation-readiness
exec: "{project-root}/{bmad_folder}/bmm/workflows/3-solutioning/implementation-readiness/workflow.md"
description: Validate PRD, UX, Architecture, Epics and stories aligned (Optional but recommended before development)
- trigger: correct-course
workflow: "{project-root}/{bmad_folder}/bmm/workflows/4-implementation/correct-course/workflow.yaml"
description: Course Correction Analysis (optional during implementation when things go off track)

View File

@ -108,7 +108,8 @@ Stories move through these states in the sprint status file:
**As Needed:**
- Run `workflow-status` anytime to check progress
- Run `sprint-status` anytime in Phase 4 to inspect sprint-status.yaml and get the next implementation command
- Run `workflow-status` for cross-phase routing and project-level paths
- Run `correct-course` if significant changes needed
---
@ -155,7 +156,7 @@ PRD (PM) → Architecture (Architect)
## Troubleshooting
**Q: Which workflow should I run next?**
A: Run `workflow-status` - it reads the sprint status file and tells you exactly what to do.
A: Run `workflow-status` - it reads the sprint status file and tells you exactly what to do. During implementation (Phase 4) run `sprint-status` (fast check against sprint-status.yaml).
**Q: Story needs significant changes mid-implementation?**
A: Run `correct-course` to analyze impact and route appropriately.

View File

@ -1,5 +1,5 @@
---
name: Product Brief Workflow
name: create-product-brief
description: Create comprehensive product briefs through collaborative step-by-step discovery as creative Business Analyst working with the user as peers.
web_bundle: true
---

View File

@ -1,6 +1,7 @@
---
name: Research Workflow
name: research
description: Conduct comprehensive research across multiple domains using current web data and verified sources - Market, Technical, Domain and other research types.
web_bundle: true
---
# Research Workflow

View File

@ -1,3 +1,9 @@
---
name: create-ux-design
description: Work with a peer UX Design expert to plan your applications UX patterns, look and feel.
web_bundle: true
---
# Create UX Design Workflow
**Goal:** Create comprehensive UX design specifications through collaborative visual exploration and informed decision-making where you act as a UX facilitator working with a product stakeholder.

View File

@ -1,7 +1,7 @@
---
name: PRD Workflow
name: create-prd
description: Creates a comprehensive PRDs through collaborative step-by-step discovery between two product managers working as peers.
main_config: `{project-root}/{bmad_folder}/bmm/config.yaml`
main_config: '{project-root}/{bmad_folder}/bmm/config.yaml'
web_bundle: true
---

View File

@ -1,6 +1,7 @@
---
name: Architecture Workflow
name: create-architecture
description: Collaborative architectural decision facilitation for AI-agent consistency. Replaces template-driven architecture with intelligent, adaptive conversation that produces a decision-focused architecture document optimized for preventing agent conflicts.
web_bundle: true
---
# Architecture Workflow

View File

@ -1,5 +1,5 @@
---
name: 'Create Epics and Stories'
name: create-epics-stories
description: 'Transform PRD requirements and Architecture decisions into comprehensive stories organized by user value. This workflow requires completed PRD + Architecture documents (UX recommended if UI exists) and breaks down requirements into implementation-ready epics and user stories that incorporate all available technical and design context. Creates detailed, actionable stories with complete acceptance criteria for development teams.'
web_bundle: true
---

View File

@ -1,5 +1,5 @@
---
name: 'Implementation Readiness'
name: check-implementation-readiness
description: 'Critical validation workflow that assesses PRD, Architecture, and Epics & Stories for completeness and alignment before implementation. Uses adversarial review approach to find gaps and issues.'
web_bundle: false
---

View File

@ -0,0 +1,174 @@
# Sprint Status - Multi-Mode Service
<critical>The workflow execution engine is governed by: {project-root}/{bmad_folder}/core/tasks/workflow.xml</critical>
<critical>You MUST have already loaded and processed: {project-root}/{bmad_folder}/bmm/workflows/4-implementation/sprint-status/workflow.yaml</critical>
<critical>Modes: interactive (default), validate, data</critical>
<critical>⚠️ ABSOLUTELY NO TIME ESTIMATES. Do NOT mention hours, days, weeks, or timelines.</critical>
<workflow>
<step n="0" goal="Determine execution mode">
<action>Set mode = {{mode}} if provided by caller; otherwise mode = "interactive"</action>
<check if="mode == data">
<action>Jump to Step 20</action>
</check>
<check if="mode == validate">
<action>Jump to Step 30</action>
</check>
<check if="mode == interactive">
<action>Continue to Step 1</action>
</check>
</step>
<step n="1" goal="Locate sprint status file">
<action>Try {sprint_status_file}</action>
<check if="file not found">
<output>❌ sprint-status.yaml not found.
Run `/bmad:bmm:workflows:sprint-planning` to generate it, then rerun sprint-status.</output>
<action>Exit workflow</action>
</check>
<action>Continue to Step 2</action>
</step>
<step n="2" goal="Read and parse sprint-status.yaml">
<action>Read the FULL file: {sprint_status_file}</action>
<action>Parse fields: generated, project, project_key, tracking_system, story_location</action>
<action>Parse development_status map. Classify keys:</action>
- Epics: keys starting with "epic-" (and not ending with "-retrospective")
- Retrospectives: keys ending with "-retrospective"
- Stories: everything else (e.g., 1-2-login-form)
<action>Count story statuses: backlog, drafted, ready-for-dev, in-progress, review, done</action>
<action>Count epic statuses: backlog, contexted</action>
<action>Detect risks:</action>
- Stories in review but no reviewer assigned context → suggest `/bmad:bmm:workflows:code-review`
- Stories in in-progress with no ready-for-dev items behind them → keep focus on the active story
- All epics backlog/contexted but no stories drafted → prompt to run `/bmad:bmm:workflows:create-story`
</step>
<step n="3" goal="Select next action recommendation">
<action>Pick the next recommended workflow using priority:</action>
1. If any story status == in-progress → recommend `dev-story` for the first in-progress story
2. Else if any story status == review → recommend `code-review` for the first review story
3. Else if any story status == ready-for-dev → recommend `dev-story`
4. Else if any story status == drafted → recommend `story-ready`
5. Else if any story status == backlog → recommend `create-story`
6. Else if any epic status == backlog → recommend `epic-tech-context`
7. Else if retrospectives are optional → recommend `retrospective`
8. Else → All implementation items done; suggest `workflow-status` to plan next phase
<action>Store selected recommendation as: next_story_id, next_workflow_id, next_agent (SM/DEV as appropriate)</action>
</step>
<step n="4" goal="Display summary">
<output>
## 📊 Sprint Status
- Project: {{project}} ({{project_key}})
- Tracking: {{tracking_system}}
- Status file: {sprint_status_file}
**Stories:** backlog {{count_backlog}}, drafted {{count_drafted}}, ready-for-dev {{count_ready}}, in-progress {{count_in_progress}}, review {{count_review}}, done {{count_done}}
**Epics:** backlog {{epic_backlog}}, contexted {{epic_contexted}}
**Next Recommendation:** /bmad:bmm:workflows:{{next_workflow_id}} ({{next_story_id}})
{{#if risks}}
**Risks:**
{{#each risks}}
- {{this}}
{{/each}}
{{/if}}
{{#if by_epic}}
**Per Epic:**
{{#each by_epic}}
- {{epic_id}}: context={{context_status}}, stories → backlog {{backlog}}, drafted {{drafted}}, ready {{ready_for_dev}}, in-progress {{in_progress}}, review {{review}}, done {{done}}
{{/each}}
{{/if}}
</output>
</step>
<step n="5" goal="Offer actions">
<ask>Pick an option:
1) Run recommended workflow now
2) Show all stories grouped by status
3) Show raw sprint-status.yaml
4) Exit
Choice:</ask>
<check if="choice == 1">
<output>Run `/bmad:bmm:workflows:{{next_workflow_id}}`.
If the command targets a story, set `story_key={{next_story_id}}` when prompted.</output>
</check>
<check if="choice == 2">
<output>
### Stories by Status
- In Progress: {{stories_in_progress}}
- Review: {{stories_in_review}}
- Ready for Dev: {{stories_ready_for_dev}}
- Drafted: {{stories_drafted}}
- Backlog: {{stories_backlog}}
- Done: {{stories_done}}
</output>
</check>
<check if="choice == 3">
<action>Display the full contents of {sprint_status_file}</action>
</check>
<check if="choice == 4">
<action>Exit workflow</action>
</check>
</step>
<!-- ========================= -->
<!-- Data mode for other flows -->
<!-- ========================= -->
<step n="20" goal="Data mode output">
<action>Load and parse {sprint_status_file} same as Step 2</action>
<action>Compute recommendation same as Step 3</action>
<template-output>next_workflow_id = {{next_workflow_id}}</template-output>
<template-output>next_story_id = {{next_story_id}}</template-output>
<template-output>count_backlog = {{count_backlog}}</template-output>
<template-output>count_drafted = {{count_drafted}}</template-output>
<template-output>count_ready = {{count_ready}}</template-output>
<template-output>count_in_progress = {{count_in_progress}}</template-output>
<template-output>count_review = {{count_review}}</template-output>
<template-output>count_done = {{count_done}}</template-output>
<template-output>epic_backlog = {{epic_backlog}}</template-output>
<template-output>epic_contexted = {{epic_contexted}}</template-output>
<template-output>warnings = {{risks}}</template-output>
<action>Return to caller</action>
</step>
<!-- ========================= -->
<!-- Validate mode -->
<!-- ========================= -->
<step n="30" goal="Validate sprint-status file">
<action>Check that {sprint_status_file} exists</action>
<check if="missing">
<template-output>is_valid = false</template-output>
<template-output>error = "sprint-status.yaml missing"</template-output>
<template-output>suggestion = "Run sprint-planning to create it"</template-output>
<action>Return</action>
</check>
<action>Read file and verify it has a development_status section with at least one entry</action>
<check if="validation fails">
<template-output>is_valid = false</template-output>
<template-output>error = "development_status missing or empty"</template-output>
<template-output>suggestion = "Re-run sprint-planning or repair the file manually"</template-output>
<action>Return</action>
</check>
<template-output>is_valid = true</template-output>
<template-output>message = "sprint-status.yaml present and parsable"</template-output>
</step>
</workflow>

View File

@ -0,0 +1,35 @@
# Sprint Status - Implementation Tracker
name: sprint-status
description: "Summarize sprint-status.yaml, surface risks, and route to the right implementation workflow."
author: "BMad"
# Critical variables from config
config_source: "{project-root}/{bmad_folder}/bmm/config.yaml"
output_folder: "{config_source}:output_folder"
user_name: "{config_source}:user_name"
communication_language: "{config_source}:communication_language"
document_output_language: "{config_source}:document_output_language"
date: system-generated
sprint_artifacts: "{config_source}:sprint_artifacts"
# Workflow components
installed_path: "{project-root}/{bmad_folder}/bmm/workflows/4-implementation/sprint-status"
instructions: "{installed_path}/instructions.md"
# Inputs
variables:
sprint_status_file: "{sprint_artifacts}/sprint-status.yaml || {output_folder}/sprint-status.yaml"
tracking_system: "file-system"
# Smart input file references
input_file_patterns:
sprint_status:
description: "Sprint status file generated by sprint-planning"
whole: "{sprint_artifacts}/sprint-status.yaml || {output_folder}/sprint-status.yaml"
load_strategy: "FULL_LOAD"
# Standalone so IDE commands get generated
standalone: true
# No web bundle needed
web_bundle: false

View File

@ -32,18 +32,115 @@
</check>
<check if="Mode B">
<ask>**[t] Plan first** - Create tech-spec then implement
<!-- Escalation Threshold: Lightweight check - should we invoke scale-adaptive? -->
<action>Evaluate escalation threshold against user input (minimal tokens, no file loading):
**Triggers escalation** (if 2+ signals present):
- Multiple components mentioned (e.g., dashboard + api + database)
- System-level language (e.g., platform, integration, architecture)
- Uncertainty about approach (e.g., "how should I", "best way to")
- Multi-layer scope (e.g., UI + backend + data together)
- Extended timeframe (e.g., "this week", "over the next few days")
**Reduces signal:**
- Simplicity markers (e.g., "just", "quickly", "fix", "bug", "typo", "simple", "basic", "minor")
- Single file/component focus
- Confident, specific request
Use holistic judgment, not mechanical keyword matching.</action>
<!-- No Escalation: Simple request, offer existing choice -->
<check if="escalation threshold NOT triggered">
<ask>**[t] Plan first** - Create tech-spec then implement
**[e] Execute directly** - Start now</ask>
<check if="t">
<action>Load and execute {create_tech_spec_workflow}</action>
<action>Continue to implementation after spec complete</action>
<check if="t">
<action>Load and execute {create_tech_spec_workflow}</action>
<action>Continue to implementation after spec complete</action>
</check>
<check if="e">
<ask>Any additional guidance before I begin? (patterns, files, constraints) Or "go" to start.</ask>
<goto>step_2</goto>
</check>
</check>
<check if="e">
<ask>Any additional guidance before I begin? (patterns, files, constraints) Or "go" to start.</ask>
<goto>step_2</goto>
<!-- Escalation Triggered: Load scale-adaptive and evaluate level -->
<check if="escalation threshold triggered">
<action>Load {project_levels} and evaluate user input against detection_hints.keywords</action>
<action>Determine level (0-4) using scale-adaptive definitions</action>
<!-- Level 0: Scale-adaptive confirms simple, fall back to standard choice -->
<check if="level 0">
<ask>**[t] Plan first** - Create tech-spec then implement
**[e] Execute directly** - Start now</ask>
<check if="t">
<action>Load and execute {create_tech_spec_workflow}</action>
<action>Continue to implementation after spec complete</action>
</check>
<check if="e">
<ask>Any additional guidance before I begin? (patterns, files, constraints) Or "go" to start.</ask>
<goto>step_2</goto>
</check>
</check>
<check if="level 1 or 2 or couldn't determine level">
<ask>This looks like a focused feature with multiple components.
**[t] Create tech-spec first** (recommended)
**[w] Seems bigger than quick-dev** — see what BMad Method recommends (workflow-init)
**[e] Execute directly**</ask>
<check if="t">
<action>Load and execute {create_tech_spec_workflow}</action>
<action>Continue to implementation after spec complete</action>
</check>
<check if="w">
<action>Load and execute {workflow_init}</action>
<action>EXIT quick-dev - user has been routed to BMad Method</action>
</check>
<check if="e">
<ask>Any additional guidance before I begin? (patterns, files, constraints) Or "go" to start.</ask>
<goto>step_2</goto>
</check>
</check>
<!-- Level 3+: BMad Method territory, recommend workflow-init -->
<check if="level 3 or higher">
<ask>This sounds like platform/system work.
**[w] Start BMad Method** (recommended) (workflow-init)
**[t] Create tech-spec** (lighter planning)
**[e] Execute directly** - feeling lucky</ask>
<check if="w">
<action>Load and execute {workflow_init}</action>
<action>EXIT quick-dev - user has been routed to BMad Method</action>
</check>
<check if="t">
<action>Load and execute {create_tech_spec_workflow}</action>
<action>Continue to implementation after spec complete</action>
</check>
<check if="e">
<ask>Any additional guidance before I begin? (patterns, files, constraints) Or "go" to start.</ask>
<goto>step_2</goto>
</check>
</check>
</check>
</check>
</step>

View File

@ -25,5 +25,9 @@ create_tech_spec_workflow: "{project-root}/{bmad_folder}/bmm/workflows/bmad-quic
party_mode_exec: "{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md"
advanced_elicitation: "{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml"
# Routing resources (lazy-loaded)
project_levels: "{project-root}/{bmad_folder}/bmm/workflows/workflow-status/project-levels.yaml"
workflow_init: "{project-root}/{bmad_folder}/bmm/workflows/workflow-status/init/workflow.yaml"
standalone: true
web_bundle: false

View File

@ -1,5 +1,5 @@
---
name: Generate Project Context
name: generate-project-context
description: Creates a concise project_context.md file with critical rules and patterns that AI agents must follow when implementing code. Optimized for LLM context efficiency.
---

View File

@ -141,6 +141,11 @@ class Installer {
content = content.replaceAll('{bmad_folder}', bmadFolderName);
}
// Replace escape sequence {*bmad_folder*} with literal {bmad_folder}
if (content.includes('{*bmad_folder*}')) {
content = content.replaceAll('{*bmad_folder*}', '{bmad_folder}');
}
// Process AgentVibes injection points
content = this.processTTSInjectionPoints(content);

View File

@ -105,7 +105,7 @@ class ManifestGenerator {
}
/**
* Recursively find and parse workflow.yaml files
* Recursively find and parse workflow.yaml and workflow.md files
*/
async getWorkflowsFromPath(basePath, moduleName) {
const workflows = [];
@ -126,11 +126,23 @@ class ManifestGenerator {
// Recurse into subdirectories
const newRelativePath = relativePath ? `${relativePath}/${entry.name}` : entry.name;
await findWorkflows(fullPath, newRelativePath);
} else if (entry.name === 'workflow.yaml') {
// Parse workflow file
} else if (entry.name === 'workflow.yaml' || entry.name === 'workflow.md') {
// Parse workflow file (both YAML and MD formats)
try {
const content = await fs.readFile(fullPath, 'utf8');
const workflow = yaml.load(content);
let workflow;
if (entry.name === 'workflow.yaml') {
// Parse YAML workflow
workflow = yaml.load(content);
} else {
// Parse MD workflow with YAML frontmatter
const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---/);
if (!frontmatterMatch) {
continue; // Skip MD files without frontmatter
}
workflow = yaml.load(frontmatterMatch[1]);
}
// Skip template workflows (those with placeholder values)
if (workflow.name && workflow.name.includes('{') && workflow.name.includes('}')) {
@ -141,18 +153,15 @@ class ManifestGenerator {
// Build relative path for installation
const installPath =
moduleName === 'core'
? `${this.bmadFolderName}/core/workflows/${relativePath}/workflow.yaml`
: `${this.bmadFolderName}/${moduleName}/workflows/${relativePath}/workflow.yaml`;
// Check for standalone property (default: false)
const standalone = workflow.standalone === true;
? `${this.bmadFolderName}/core/workflows/${relativePath}/${entry.name}`
: `${this.bmadFolderName}/${moduleName}/workflows/${relativePath}/${entry.name}`;
// ALL workflows now generate commands - no standalone property needed
workflows.push({
name: workflow.name,
description: workflow.description.replaceAll('"', '""'), // Escape quotes for CSV
module: moduleName,
path: installPath,
standalone: standalone,
});
// Add to files list
@ -541,12 +550,12 @@ class ManifestGenerator {
async writeWorkflowManifest(cfgDir) {
const csvPath = path.join(cfgDir, 'workflow-manifest.csv');
// Create CSV header with standalone column
let csv = 'name,description,module,path,standalone\n';
// Create CSV header - removed standalone column as ALL workflows now generate commands
let csv = 'name,description,module,path\n';
// Add all workflows
// Add all workflows - no standalone property needed anymore
for (const workflow of this.workflows) {
csv += `"${workflow.name}","${workflow.description}","${workflow.module}","${workflow.path}","${workflow.standalone}"\n`;
csv += `"${workflow.name}","${workflow.description}","${workflow.module}","${workflow.path}"\n`;
}
await fs.writeFile(csvPath, csv);

View File

@ -536,6 +536,11 @@ class BaseIdeSetup {
if (typeof content === 'string' && content.includes('{bmad_folder}')) {
content = content.replaceAll('{bmad_folder}', this.bmadFolderName);
}
// Replace escape sequence {*bmad_folder*} with literal {bmad_folder}
if (typeof content === 'string' && content.includes('{*bmad_folder*}')) {
content = content.replaceAll('{*bmad_folder*}', '{bmad_folder}');
}
await this.ensureDir(path.dirname(filePath));
await fs.writeFile(filePath, content, 'utf8');
}
@ -563,6 +568,11 @@ class BaseIdeSetup {
content = content.replaceAll('{bmad_folder}', this.bmadFolderName);
}
// Replace escape sequence {*bmad_folder*} with literal {bmad_folder}
if (content.includes('{*bmad_folder*}')) {
content = content.replaceAll('{*bmad_folder*}', '{bmad_folder}');
}
// Write to dest with replaced content
await fs.writeFile(dest, content, 'utf8');
} catch {

View File

@ -3,6 +3,7 @@ const fs = require('fs-extra');
const { BaseIdeSetup } = require('./_base-ide');
const chalk = require('chalk');
const { AgentCommandGenerator } = require('./shared/agent-command-generator');
const { WorkflowCommandGenerator } = require('./shared/workflow-command-generator');
/**
* Auggie CLI setup handler
@ -33,10 +34,23 @@ class AuggieSetup extends BaseIdeSetup {
const agentGen = new AgentCommandGenerator(this.bmadFolderName);
const { artifacts: agentArtifacts } = await agentGen.collectAgentArtifacts(bmadDir, options.selectedModules || []);
// Get tasks, tools, and workflows (standalone only)
// Get tasks, tools, and workflows (ALL workflows now generate commands)
const tasks = await this.getTasks(bmadDir, true);
const tools = await this.getTools(bmadDir, true);
const workflows = await this.getWorkflows(bmadDir, true);
// Get ALL workflows using the new workflow command generator
const workflowGenerator = new WorkflowCommandGenerator(this.bmadFolderName);
const { artifacts: workflowArtifacts, counts: workflowCounts } = await workflowGenerator.collectWorkflowArtifacts(bmadDir);
// Convert workflow artifacts to expected format
const workflows = workflowArtifacts
.filter((artifact) => artifact.type === 'workflow-command')
.map((artifact) => ({
module: artifact.module,
name: path.basename(artifact.relativePath, '.md'),
path: artifact.sourcePath,
content: artifact.content,
}));
const bmadCommandsDir = path.join(location, 'bmad');
const agentsDir = path.join(bmadCommandsDir, 'agents');
@ -73,13 +87,11 @@ class AuggieSetup extends BaseIdeSetup {
await this.writeFile(targetPath, commandContent);
}
// Install workflows
// Install workflows (already generated commands)
for (const workflow of workflows) {
const content = await this.readFile(workflow.path);
const commandContent = this.createWorkflowCommand(workflow, content);
// Use the pre-generated workflow command content
const targetPath = path.join(workflowsDir, `${workflow.module}-${workflow.name}.md`);
await this.writeFile(targetPath, commandContent);
await this.writeFile(targetPath, workflow.content);
}
const totalInstalled = agentArtifacts.length + tasks.length + tools.length + workflows.length;

View File

@ -3,6 +3,7 @@ const fs = require('fs-extra');
const { BaseIdeSetup } = require('./_base-ide');
const chalk = require('chalk');
const { AgentCommandGenerator } = require('./shared/agent-command-generator');
const { WorkflowCommandGenerator } = require('./shared/workflow-command-generator');
/**
* Crush IDE setup handler
@ -34,10 +35,23 @@ class CrushSetup extends BaseIdeSetup {
const agentGen = new AgentCommandGenerator(this.bmadFolderName);
const { artifacts: agentArtifacts } = await agentGen.collectAgentArtifacts(bmadDir, options.selectedModules || []);
// Get tasks, tools, and workflows (standalone only)
// Get tasks, tools, and workflows (ALL workflows now generate commands)
const tasks = await this.getTasks(bmadDir, true);
const tools = await this.getTools(bmadDir, true);
const workflows = await this.getWorkflows(bmadDir, true);
// Get ALL workflows using the new workflow command generator
const workflowGenerator = new WorkflowCommandGenerator(this.bmadFolderName);
const { artifacts: workflowArtifacts, counts: workflowCounts } = await workflowGenerator.collectWorkflowArtifacts(bmadDir);
// Convert workflow artifacts to expected format for organizeByModule
const workflows = workflowArtifacts
.filter((artifact) => artifact.type === 'workflow-command')
.map((artifact) => ({
module: artifact.module,
name: path.basename(artifact.relativePath, '.md'),
path: artifact.sourcePath,
content: artifact.content,
}));
// Organize by module
const agentCount = await this.organizeByModule(commandsDir, agentArtifacts, tasks, tools, workflows, projectDir);
@ -113,13 +127,12 @@ class CrushSetup extends BaseIdeSetup {
toolCount++;
}
// Copy module-specific workflows
// Copy module-specific workflow commands (already generated)
const moduleWorkflows = workflows.filter((w) => w.module === module);
for (const workflow of moduleWorkflows) {
const content = await this.readFile(workflow.path);
const commandContent = this.createWorkflowCommand(workflow, content);
// Use the pre-generated workflow command content
const targetPath = path.join(moduleWorkflowsDir, `${workflow.name}.md`);
await this.writeFile(targetPath, commandContent);
await this.writeFile(targetPath, workflow.content);
workflowCount++;
}
}

View File

@ -2,6 +2,7 @@ const path = require('node:path');
const { BaseIdeSetup } = require('./_base-ide');
const chalk = require('chalk');
const { AgentCommandGenerator } = require('./shared/agent-command-generator');
const { WorkflowCommandGenerator } = require('./shared/workflow-command-generator');
/**
* Cursor IDE setup handler
@ -53,10 +54,22 @@ class CursorSetup extends BaseIdeSetup {
// Convert artifacts to agent format for index creation
const agents = agentArtifacts.map((a) => ({ module: a.module, name: a.name }));
// Get tasks, tools, and workflows (standalone only)
// Get tasks, tools, and workflows (ALL workflows now generate commands)
const tasks = await this.getTasks(bmadDir, true);
const tools = await this.getTools(bmadDir, true);
const workflows = await this.getWorkflows(bmadDir, true);
// Get ALL workflows using the new workflow command generator
const workflowGenerator = new WorkflowCommandGenerator(this.bmadFolderName);
const { artifacts: workflowArtifacts, counts: workflowCounts } = await workflowGenerator.collectWorkflowArtifacts(bmadDir);
// Convert artifacts to workflow objects for directory creation
const workflows = workflowArtifacts
.filter((artifact) => artifact.type === 'workflow-command')
.map((artifact) => ({
module: artifact.module,
name: path.basename(artifact.relativePath, '.md'),
path: artifact.sourcePath,
}));
// Create directories for each module
const modules = new Set();
@ -113,18 +126,21 @@ class CursorSetup extends BaseIdeSetup {
toolCount++;
}
// Process and copy workflows
// Process and copy workflow commands (generated, not raw workflows)
let workflowCount = 0;
for (const workflow of workflows) {
const content = await this.readAndProcess(workflow.path, {
module: workflow.module,
name: workflow.name,
});
for (const artifact of workflowArtifacts) {
if (artifact.type === 'workflow-command') {
// Add MDC metadata header to workflow command
const content = this.wrapLauncherWithMDC(artifact.content, {
module: artifact.module,
name: path.basename(artifact.relativePath, '.md'),
});
const targetPath = path.join(bmadRulesDir, workflow.module, 'workflows', `${workflow.name}.mdc`);
const targetPath = path.join(bmadRulesDir, artifact.module, 'workflows', `${path.basename(artifact.relativePath, '.md')}.mdc`);
await this.writeFile(targetPath, content);
workflowCount++;
await this.writeFile(targetPath, content);
workflowCount++;
}
}
// Create BMAD index file (but NOT .cursorrules - user manages that)

View File

@ -4,6 +4,7 @@ const yaml = require('js-yaml');
const { BaseIdeSetup } = require('./_base-ide');
const chalk = require('chalk');
const { AgentCommandGenerator } = require('./shared/agent-command-generator');
const { WorkflowCommandGenerator } = require('./shared/workflow-command-generator');
/**
* Gemini CLI setup handler
@ -68,9 +69,13 @@ class GeminiSetup extends BaseIdeSetup {
const agentGen = new AgentCommandGenerator(this.bmadFolderName);
const { artifacts: agentArtifacts } = await agentGen.collectAgentArtifacts(bmadDir, options.selectedModules || []);
// Get tasks
// Get tasks and workflows (ALL workflows now generate commands)
const tasks = await this.getTasks(bmadDir);
// Get ALL workflows using the new workflow command generator
const workflowGenerator = new WorkflowCommandGenerator(this.bmadFolderName);
const { artifacts: workflowArtifacts, counts: workflowCounts } = await workflowGenerator.collectWorkflowArtifacts(bmadDir);
// Install agents as TOML files with bmad- prefix (flat structure)
let agentCount = 0;
for (const artifact of agentArtifacts) {
@ -98,17 +103,37 @@ class GeminiSetup extends BaseIdeSetup {
console.log(chalk.green(` ✓ Added task: /bmad:tasks:${task.module}:${task.name}`));
}
// Install workflows as TOML files with bmad- prefix (flat structure)
let workflowCount = 0;
for (const artifact of workflowArtifacts) {
if (artifact.type === 'workflow-command') {
// Create TOML wrapper around workflow command content
const tomlContent = await this.createWorkflowToml(artifact);
// Flat structure: bmad-workflow-{module}-{name}.toml
const workflowName = path.basename(artifact.relativePath, '.md');
const tomlPath = path.join(commandsDir, `bmad-workflow-${artifact.module}-${workflowName}.toml`);
await this.writeFile(tomlPath, tomlContent);
workflowCount++;
console.log(chalk.green(` ✓ Added workflow: /bmad:workflows:${artifact.module}:${workflowName}`));
}
}
console.log(chalk.green(`${this.name} configured:`));
console.log(chalk.dim(` - ${agentCount} agents configured`));
console.log(chalk.dim(` - ${taskCount} tasks configured`));
console.log(chalk.dim(` - ${workflowCount} workflows configured`));
console.log(chalk.dim(` - Commands directory: ${path.relative(projectDir, commandsDir)}`));
console.log(chalk.dim(` - Agent activation: /bmad:agents:{agent-name}`));
console.log(chalk.dim(` - Task activation: /bmad:tasks:{task-name}`));
console.log(chalk.dim(` - Workflow activation: /bmad:workflows:{workflow-name}`));
return {
success: true,
agents: agentCount,
tasks: taskCount,
workflows: workflowCount,
};
}
@ -149,6 +174,7 @@ ${contentWithoutFrontmatter}
// Note: {user_name} and other {config_values} are left as-is for runtime substitution by Gemini
const tomlContent = template
.replaceAll('{{title}}', title)
.replaceAll('{{*bmad_folder*}}', '{bmad_folder}')
.replaceAll('{{bmad_folder}}', this.bmadFolderName)
.replaceAll('{{module}}', agent.module)
.replaceAll('{{name}}', agent.name);
@ -170,6 +196,7 @@ ${contentWithoutFrontmatter}
// Replace template variables
const tomlContent = template
.replaceAll('{{taskName}}', taskName)
.replaceAll('{{*bmad_folder*}}', '{bmad_folder}')
.replaceAll('{{bmad_folder}}', this.bmadFolderName)
.replaceAll('{{module}}', task.module)
.replaceAll('{{filename}}', task.filename);
@ -177,6 +204,27 @@ ${contentWithoutFrontmatter}
return tomlContent;
}
/**
* Create workflow TOML content from artifact
*/
async createWorkflowToml(artifact) {
// Extract description from artifact content
const descriptionMatch = artifact.content.match(/description:\s*"([^"]+)"/);
const description = descriptionMatch
? descriptionMatch[1]
: `BMAD ${artifact.module.toUpperCase()} Workflow: ${path.basename(artifact.relativePath, '.md')}`;
// Strip frontmatter from command content
const frontmatterRegex = /^---\s*\n[\s\S]*?\n---\s*\n/;
const contentWithoutFrontmatter = artifact.content.replace(frontmatterRegex, '').trim();
return `description = "${description}"
prompt = """
${contentWithoutFrontmatter}
"""
`;
}
/**
* Cleanup Gemini configuration - surgically remove only BMAD files
*/

View File

@ -3,6 +3,7 @@ const fs = require('fs-extra');
const { BaseIdeSetup } = require('./_base-ide');
const chalk = require('chalk');
const { AgentCommandGenerator } = require('./shared/agent-command-generator');
const { WorkflowCommandGenerator } = require('./shared/workflow-command-generator');
/**
* iFlow CLI setup handler
@ -29,9 +30,11 @@ class IFlowSetup extends BaseIdeSetup {
const commandsDir = path.join(iflowDir, this.commandsDir, 'bmad');
const agentsDir = path.join(commandsDir, 'agents');
const tasksDir = path.join(commandsDir, 'tasks');
const workflowsDir = path.join(commandsDir, 'workflows');
await this.ensureDir(agentsDir);
await this.ensureDir(tasksDir);
await this.ensureDir(workflowsDir);
// Generate agent launchers
const agentGen = new AgentCommandGenerator(this.bmadFolderName);
@ -47,9 +50,13 @@ class IFlowSetup extends BaseIdeSetup {
agentCount++;
}
// Get tasks
// Get tasks and workflows (ALL workflows now generate commands)
const tasks = await this.getTasks(bmadDir);
// Get ALL workflows using the new workflow command generator
const workflowGenerator = new WorkflowCommandGenerator(this.bmadFolderName);
const { artifacts: workflowArtifacts, counts: workflowCounts } = await workflowGenerator.collectWorkflowArtifacts(bmadDir);
// Setup tasks as commands
let taskCount = 0;
for (const task of tasks) {
@ -61,15 +68,27 @@ class IFlowSetup extends BaseIdeSetup {
taskCount++;
}
// Setup workflows as commands (already generated)
let workflowCount = 0;
for (const artifact of workflowArtifacts) {
if (artifact.type === 'workflow-command') {
const targetPath = path.join(workflowsDir, `${artifact.module}-${path.basename(artifact.relativePath, '.md')}.md`);
await this.writeFile(targetPath, artifact.content);
workflowCount++;
}
}
console.log(chalk.green(`${this.name} configured:`));
console.log(chalk.dim(` - ${agentCount} agent commands created`));
console.log(chalk.dim(` - ${taskCount} task commands created`));
console.log(chalk.dim(` - ${workflowCount} workflow commands created`));
console.log(chalk.dim(` - Commands directory: ${path.relative(projectDir, commandsDir)}`));
return {
success: true,
agents: agentCount,
tasks: taskCount,
workflows: workflowCount,
};
}

View File

@ -0,0 +1,327 @@
const path = require('node:path');
const { BaseIdeSetup } = require('./_base-ide');
const chalk = require('chalk');
const fs = require('fs-extra');
const yaml = require('js-yaml');
/**
* Kiro CLI setup handler for BMad Method
*/
class KiroCliSetup extends BaseIdeSetup {
constructor() {
super('kiro-cli', 'Kiro CLI', false);
this.configDir = '.kiro';
this.agentsDir = 'agents';
}
/**
* Cleanup old BMAD installation before reinstalling
* @param {string} projectDir - Project directory
*/
async cleanup(projectDir) {
const bmadAgentsDir = path.join(projectDir, this.configDir, this.agentsDir);
if (await fs.pathExists(bmadAgentsDir)) {
// Remove existing BMad agents
const files = await fs.readdir(bmadAgentsDir);
for (const file of files) {
if (file.startsWith('bmad-') || file.includes('bmad')) {
await fs.remove(path.join(bmadAgentsDir, file));
}
}
console.log(chalk.dim(` Cleaned old BMAD agents from ${this.name}`));
}
}
/**
* Setup Kiro CLI configuration with BMad agents
* @param {string} projectDir - Project directory
* @param {string} bmadDir - BMAD installation directory
* @param {Object} options - Setup options
*/
async setup(projectDir, bmadDir, options = {}) {
console.log(chalk.cyan(`Setting up ${this.name}...`));
await this.cleanup(projectDir);
const kiroDir = path.join(projectDir, this.configDir);
const agentsDir = path.join(kiroDir, this.agentsDir);
await this.ensureDir(agentsDir);
// Create BMad agents from source YAML files
await this.createBmadAgentsFromSource(agentsDir, projectDir);
console.log(chalk.green(`${this.name} configured with BMad agents`));
}
/**
* Create BMad agent definitions from source YAML files
* @param {string} agentsDir - Agents directory
* @param {string} projectDir - Project directory
*/
async createBmadAgentsFromSource(agentsDir, projectDir) {
const sourceDir = path.join(__dirname, '../../../../../src/modules');
// Find all agent YAML files
const agentFiles = await this.findAgentFiles(sourceDir);
for (const agentFile of agentFiles) {
try {
await this.processAgentFile(agentFile, agentsDir, projectDir);
} catch (error) {
console.warn(chalk.yellow(`⚠️ Failed to process ${agentFile}: ${error.message}`));
}
}
}
/**
* Find all agent YAML files in modules and core
* @param {string} sourceDir - Source modules directory
* @returns {Array} Array of agent file paths
*/
async findAgentFiles(sourceDir) {
const agentFiles = [];
// Check core agents
const coreAgentsDir = path.join(__dirname, '../../../../../src/core/agents');
if (await fs.pathExists(coreAgentsDir)) {
const files = await fs.readdir(coreAgentsDir);
for (const file of files) {
if (file.endsWith('.agent.yaml')) {
agentFiles.push(path.join(coreAgentsDir, file));
}
}
}
// Check module agents
if (!(await fs.pathExists(sourceDir))) {
return agentFiles;
}
const modules = await fs.readdir(sourceDir);
for (const module of modules) {
const moduleAgentsDir = path.join(sourceDir, module, 'agents');
if (await fs.pathExists(moduleAgentsDir)) {
const files = await fs.readdir(moduleAgentsDir);
for (const file of files) {
if (file.endsWith('.agent.yaml')) {
agentFiles.push(path.join(moduleAgentsDir, file));
}
}
}
}
return agentFiles;
}
/**
* Validate BMad Core compliance
* @param {Object} agentData - Agent YAML data
* @returns {boolean} True if compliant
*/
validateBmadCompliance(agentData) {
const requiredFields = ['agent.metadata.id', 'agent.persona.role', 'agent.persona.principles'];
for (const field of requiredFields) {
const keys = field.split('.');
let current = agentData;
for (const key of keys) {
if (!current || !current[key]) {
return false;
}
current = current[key];
}
}
return true;
}
/**
* Process individual agent YAML file
* @param {string} agentFile - Path to agent YAML file
* @param {string} agentsDir - Target agents directory
* @param {string} projectDir - Project directory
*/
async processAgentFile(agentFile, agentsDir, projectDir) {
const yamlContent = await fs.readFile(agentFile, 'utf8');
const agentData = yaml.load(yamlContent);
if (!this.validateBmadCompliance(agentData)) {
return;
}
// Extract module from file path
const normalizedPath = path.normalize(agentFile);
const pathParts = normalizedPath.split(path.sep);
const basename = path.basename(agentFile, '.agent.yaml');
// Find the module name from path
let moduleName = 'unknown';
if (pathParts.includes('src')) {
const srcIndex = pathParts.indexOf('src');
if (srcIndex + 3 < pathParts.length) {
const folderAfterSrc = pathParts[srcIndex + 1];
// Handle both src/core/agents and src/modules/[module]/agents patterns
if (folderAfterSrc === 'core') {
moduleName = 'core';
} else if (folderAfterSrc === 'modules') {
moduleName = pathParts[srcIndex + 2]; // The actual module name
}
}
}
// Extract the agent name from the ID path in YAML if available
let agentBaseName = basename;
if (agentData.agent && agentData.agent.metadata && agentData.agent.metadata.id) {
const idPath = agentData.agent.metadata.id;
agentBaseName = path.basename(idPath, '.md');
}
const agentName = `bmad-${moduleName}-${agentBaseName}`;
const sanitizedAgentName = this.sanitizeAgentName(agentName);
// Create JSON definition
await this.createAgentDefinitionFromYaml(agentsDir, sanitizedAgentName, agentData);
// Create prompt file
await this.createAgentPromptFromYaml(agentsDir, sanitizedAgentName, agentData, projectDir);
}
/**
* Sanitize agent name for file naming
* @param {string} name - Agent name
* @returns {string} Sanitized name
*/
sanitizeAgentName(name) {
return name
.toLowerCase()
.replaceAll(/\s+/g, '-')
.replaceAll(/[^a-z0-9-]/g, '');
}
/**
* Create agent JSON definition from YAML data
* @param {string} agentsDir - Agents directory
* @param {string} agentName - Agent name (role-based)
* @param {Object} agentData - Agent YAML data
*/
async createAgentDefinitionFromYaml(agentsDir, agentName, agentData) {
const personName = agentData.agent.metadata.name;
const role = agentData.agent.persona.role;
const agentConfig = {
name: agentName,
description: `${personName} - ${role}`,
prompt: `file://./${agentName}-prompt.md`,
tools: ['*'],
mcpServers: {},
useLegacyMcpJson: true,
resources: [],
};
const agentPath = path.join(agentsDir, `${agentName}.json`);
await fs.writeJson(agentPath, agentConfig, { spaces: 2 });
}
/**
* Create agent prompt from YAML data
* @param {string} agentsDir - Agents directory
* @param {string} agentName - Agent name (role-based)
* @param {Object} agentData - Agent YAML data
* @param {string} projectDir - Project directory
*/
async createAgentPromptFromYaml(agentsDir, agentName, agentData, projectDir) {
const promptPath = path.join(agentsDir, `${agentName}-prompt.md`);
// Generate prompt from YAML data
const prompt = this.generatePromptFromYaml(agentData);
await fs.writeFile(promptPath, prompt);
}
/**
* Generate prompt content from YAML data
* @param {Object} agentData - Agent YAML data
* @returns {string} Generated prompt
*/
generatePromptFromYaml(agentData) {
const agent = agentData.agent;
const name = agent.metadata.name;
const icon = agent.metadata.icon || '🤖';
const role = agent.persona.role;
const identity = agent.persona.identity;
const style = agent.persona.communication_style;
const principles = agent.persona.principles;
let prompt = `# ${name} ${icon}\n\n`;
prompt += `## Role\n${role}\n\n`;
if (identity) {
prompt += `## Identity\n${identity}\n\n`;
}
if (style) {
prompt += `## Communication Style\n${style}\n\n`;
}
if (principles) {
prompt += `## Principles\n`;
if (typeof principles === 'string') {
// Handle multi-line string principles
prompt += principles + '\n\n';
} else if (Array.isArray(principles)) {
// Handle array principles
for (const principle of principles) {
prompt += `- ${principle}\n`;
}
prompt += '\n';
}
}
// Add menu items if available
if (agent.menu && agent.menu.length > 0) {
prompt += `## Available Workflows\n`;
for (let i = 0; i < agent.menu.length; i++) {
const item = agent.menu[i];
prompt += `${i + 1}. **${item.trigger}**: ${item.description}\n`;
}
prompt += '\n';
}
prompt += `## Instructions\nYou are ${name}, part of the BMad Method. Follow your role and principles while assisting users with their development needs.\n`;
return prompt;
}
/**
* Check if Kiro CLI is available
* @returns {Promise<boolean>} True if available
*/
async isAvailable() {
try {
const { execSync } = require('node:child_process');
execSync('kiro-cli --version', { stdio: 'ignore' });
return true;
} catch {
return false;
}
}
/**
* Get installation instructions
* @returns {string} Installation instructions
*/
getInstallInstructions() {
return `Install Kiro CLI:
curl -fsSL https://github.com/aws/kiro-cli/releases/latest/download/install.sh | bash
Or visit: https://github.com/aws/kiro-cli`;
}
}
module.exports = { KiroCliSetup };

View File

@ -47,7 +47,7 @@ class OpenCodeSetup extends BaseIdeSetup {
agentCount++;
}
// Install workflow commands with flat naming: bmad-workflow-{module}-{name}.md
// Install workflow commands with flat naming: bmad-{module}-{workflow-name}
const workflowGenerator = new WorkflowCommandGenerator(this.bmadFolderName);
const { artifacts: workflowArtifacts, counts: workflowCounts } = await workflowGenerator.collectWorkflowArtifacts(bmadDir);
@ -55,10 +55,10 @@ class OpenCodeSetup extends BaseIdeSetup {
for (const artifact of workflowArtifacts) {
if (artifact.type === 'workflow-command') {
const commandContent = artifact.content;
// Flat structure: bmad-workflow-{module}-{name}.md
// Flat structure: bmad-{module}-{workflow-name}.md
// artifact.relativePath is like: bmm/workflows/plan-project.md
const workflowName = path.basename(artifact.relativePath, '.md');
const targetPath = path.join(commandsBaseDir, `bmad-workflow-${artifact.module}-${workflowName}.md`);
const targetPath = path.join(commandsBaseDir, `bmad-${artifact.module}-${workflowName}.md`);
await this.writeFile(targetPath, commandContent);
workflowCommandCount++;
}

View File

@ -5,34 +5,13 @@ const { AgentCommandGenerator } = require('./shared/agent-command-generator');
/**
* Roo IDE setup handler
* Creates custom modes in .roomodes file
* Creates custom commands in .roo/commands directory
*/
class RooSetup extends BaseIdeSetup {
constructor() {
super('roo', 'Roo Code');
this.configFile = '.roomodes';
this.defaultPermissions = {
dev: {
description: 'Development files',
fileRegex: String.raw`.*\.(js|jsx|ts|tsx|py|java|cpp|c|h|cs|go|rs|php|rb|swift)$`,
},
config: {
description: 'Configuration files',
fileRegex: String.raw`.*\.(json|yaml|yml|toml|xml|ini|env|config)$`,
},
docs: {
description: 'Documentation files',
fileRegex: String.raw`.*\.(md|mdx|rst|txt|doc|docx)$`,
},
styles: {
description: 'Style and design files',
fileRegex: String.raw`.*\.(css|scss|sass|less|stylus)$`,
},
all: {
description: 'All files',
fileRegex: '.*',
},
};
this.configDir = '.roo';
this.commandsDir = 'commands';
}
/**
@ -44,94 +23,96 @@ class RooSetup extends BaseIdeSetup {
async setup(projectDir, bmadDir, options = {}) {
console.log(chalk.cyan(`Setting up ${this.name}...`));
// Check for existing .roomodes file
const roomodesPath = path.join(projectDir, this.configFile);
let existingModes = [];
let existingContent = '';
// Create .roo/commands directory
const rooCommandsDir = path.join(projectDir, this.configDir, this.commandsDir);
await this.ensureDir(rooCommandsDir);
if (await this.pathExists(roomodesPath)) {
existingContent = await this.readFile(roomodesPath);
// Parse existing modes to avoid duplicates
const modeMatches = existingContent.matchAll(/- slug: ([\w-]+)/g);
for (const match of modeMatches) {
existingModes.push(match[1]);
}
console.log(chalk.yellow(`Found existing .roomodes file with ${existingModes.length} modes`));
}
// Generate agent launchers (though Roo will reference the actual .bmad agents)
// Generate agent launchers
const agentGen = new AgentCommandGenerator(this.bmadFolderName);
const { artifacts: agentArtifacts } = await agentGen.collectAgentArtifacts(bmadDir, options.selectedModules || []);
// Always use 'all' permissions - users can customize in .roomodes file
const permissionChoice = 'all';
// Create modes content
let newModesContent = '';
let addedCount = 0;
let skippedCount = 0;
for (const artifact of agentArtifacts) {
const slug = `bmad-${artifact.module}-${artifact.name}`;
const commandName = `bmad-${artifact.module}-agent-${artifact.name}`;
const commandPath = path.join(rooCommandsDir, `${commandName}.md`);
// Skip if already exists
if (existingModes.includes(slug)) {
console.log(chalk.dim(` Skipping ${slug} - already exists`));
if (await this.pathExists(commandPath)) {
console.log(chalk.dim(` Skipping ${commandName} - already exists`));
skippedCount++;
continue;
}
// Read the actual agent file from .bmad for metadata extraction
// Read the actual agent file from .bmad for metadata extraction (installed agents are .md files)
const agentPath = path.join(bmadDir, artifact.module, 'agents', `${artifact.name}.md`);
const content = await this.readFile(agentPath);
// Create mode entry that references the actual .bmad agent
const modeEntry = await this.createModeEntry(
{ module: artifact.module, name: artifact.name, path: agentPath },
content,
permissionChoice,
projectDir,
);
// Create command file that references the actual .bmad agent
await this.createCommandFile({ module: artifact.module, name: artifact.name, path: agentPath }, content, commandPath, projectDir);
newModesContent += modeEntry;
addedCount++;
console.log(chalk.green(` ✓ Added mode: ${slug}`));
console.log(chalk.green(` ✓ Added command: ${commandName}`));
}
// Build final content
let finalContent = '';
if (existingContent) {
// Append to existing content
finalContent = existingContent.trim() + '\n' + newModesContent;
} else {
// Create new .roomodes file
finalContent = 'customModes:\n' + newModesContent;
}
// Write .roomodes file
await this.writeFile(roomodesPath, finalContent);
console.log(chalk.green(`${this.name} configured:`));
console.log(chalk.dim(` - ${addedCount} modes added`));
console.log(chalk.dim(` - ${addedCount} commands added`));
if (skippedCount > 0) {
console.log(chalk.dim(` - ${skippedCount} modes skipped (already exist)`));
console.log(chalk.dim(` - ${skippedCount} commands skipped (already exist)`));
}
console.log(chalk.dim(` - Configuration file: ${this.configFile}`));
console.log(chalk.dim(` - Permission level: all (unrestricted)`));
console.log(chalk.yellow(`\n 💡 Tip: Edit ${this.configFile} to customize file permissions per agent`));
console.log(chalk.dim(` Modes will be available when you open this project in Roo Code`));
console.log(chalk.dim(` - Commands directory: ${this.configDir}/${this.commandsDir}/bmad/`));
console.log(chalk.dim(` Commands will be available when you open this project in Roo Code`));
return {
success: true,
modes: addedCount,
commands: addedCount,
skipped: skippedCount,
};
}
/**
* Create a mode entry for an agent
* Create a unified command file for agents
* @param {string} commandPath - Path where to write the command file
* @param {Object} options - Command options
* @param {string} options.name - Display name for the command
* @param {string} options.description - Description for the command
* @param {string} options.agentPath - Path to the agent file (relative to project root)
* @param {string} [options.icon] - Icon emoji (defaults to 🤖)
* @param {string} [options.extraContent] - Additional content to include before activation
*/
async createModeEntry(agent, content, permissionChoice, projectDir) {
async createAgentCommandFile(commandPath, options) {
const { name, description, agentPath, icon = '🤖', extraContent = '' } = options;
// Build command content with YAML frontmatter
let commandContent = `---\n`;
commandContent += `name: '${icon} ${name}'\n`;
commandContent += `description: '${description}'\n`;
commandContent += `---\n\n`;
commandContent += `You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.\n\n`;
// Add any extra content (e.g., warnings for custom agents)
if (extraContent) {
commandContent += `${extraContent}\n\n`;
}
commandContent += `<agent-activation CRITICAL="TRUE">\n`;
commandContent += `1. LOAD the FULL agent file from @${agentPath}\n`;
commandContent += `2. READ its entire contents - this contains the complete agent persona, menu, and instructions\n`;
commandContent += `3. Execute ALL activation steps exactly as written in the agent file\n`;
commandContent += `4. Follow the agent's persona and menu system precisely\n`;
commandContent += `5. Stay in character throughout the session\n`;
commandContent += `</agent-activation>\n`;
// Write command file
await this.writeFile(commandPath, commandContent);
}
/**
* Create a command file for an agent
*/
async createCommandFile(agent, content, commandPath, projectDir) {
// Extract metadata from agent content
const titleMatch = content.match(/title="([^"]+)"/);
const title = titleMatch ? titleMatch[1] : this.formatTitle(agent.name);
@ -142,66 +123,16 @@ class RooSetup extends BaseIdeSetup {
const whenToUseMatch = content.match(/whenToUse="([^"]+)"/);
const whenToUse = whenToUseMatch ? whenToUseMatch[1] : `Use for ${title} tasks`;
// Get the activation header from central template
const activationHeader = await this.getAgentCommandHeader();
const roleDefinitionMatch = content.match(/roleDefinition="([^"]+)"/);
const roleDefinition = roleDefinitionMatch
? roleDefinitionMatch[1]
: `You are a ${title} specializing in ${title.toLowerCase()} tasks and responsibilities.`;
// Get relative path
const relativePath = path.relative(projectDir, agent.path).replaceAll('\\', '/');
// Determine permissions
const permissions = this.getPermissionsForAgent(agent, permissionChoice);
// Build mode entry
const slug = `bmad-${agent.module}-${agent.name}`;
let modeEntry = ` - slug: ${slug}\n`;
modeEntry += ` name: '${icon} ${title}'\n`;
if (permissions && permissions.description) {
modeEntry += ` description: '${permissions.description}'\n`;
}
modeEntry += ` roleDefinition: ${roleDefinition}\n`;
modeEntry += ` whenToUse: ${whenToUse}\n`;
modeEntry += ` customInstructions: ${activationHeader} Read the full YAML from ${relativePath} start activation to alter your state of being follow startup section instructions stay in this being until told to exit this mode\n`;
modeEntry += ` groups:\n`;
modeEntry += ` - read\n`;
if (permissions && permissions.fileRegex) {
modeEntry += ` - - edit\n`;
modeEntry += ` - fileRegex: ${permissions.fileRegex}\n`;
modeEntry += ` description: ${permissions.description}\n`;
} else {
modeEntry += ` - edit\n`;
}
return modeEntry;
}
/**
* Get permissions configuration for an agent
*/
getPermissionsForAgent(agent, permissionChoice) {
if (permissionChoice === 'custom') {
// Custom logic based on agent name/module
if (agent.name.includes('dev') || agent.name.includes('code')) {
return this.defaultPermissions.dev;
} else if (agent.name.includes('doc') || agent.name.includes('write')) {
return this.defaultPermissions.docs;
} else if (agent.name.includes('config') || agent.name.includes('setup')) {
return this.defaultPermissions.config;
} else if (agent.name.includes('style') || agent.name.includes('css')) {
return this.defaultPermissions.styles;
}
// Default to all for custom agents
return this.defaultPermissions.all;
}
return this.defaultPermissions[permissionChoice] || null;
// Use unified method
await this.createAgentCommandFile(commandPath, {
name: title,
description: whenToUse,
agentPath: relativePath,
icon: icon,
});
}
/**
@ -219,8 +150,26 @@ class RooSetup extends BaseIdeSetup {
*/
async cleanup(projectDir) {
const fs = require('fs-extra');
const roomodesPath = path.join(projectDir, this.configFile);
const rooCommandsDir = path.join(projectDir, this.configDir, this.commandsDir);
if (await fs.pathExists(rooCommandsDir)) {
const files = await fs.readdir(rooCommandsDir);
let removedCount = 0;
for (const file of files) {
if (file.startsWith('bmad-') && file.endsWith('.md')) {
await fs.remove(path.join(rooCommandsDir, file));
removedCount++;
}
}
if (removedCount > 0) {
console.log(chalk.dim(`Removed ${removedCount} BMAD commands from .roo/commands/`));
}
}
// Also clean up old .roomodes file if it exists
const roomodesPath = path.join(projectDir, '.roomodes');
if (await fs.pathExists(roomodesPath)) {
const content = await fs.readFile(roomodesPath, 'utf8');
@ -245,7 +194,9 @@ class RooSetup extends BaseIdeSetup {
// Write back filtered content
await fs.writeFile(roomodesPath, filteredLines.join('\n'));
console.log(chalk.dim(`Removed ${removedCount} BMAD modes from .roomodes`));
if (removedCount > 0) {
console.log(chalk.dim(`Removed ${removedCount} BMAD modes from legacy .roomodes file`));
}
}
}
@ -254,68 +205,53 @@ class RooSetup extends BaseIdeSetup {
* @param {string} projectDir - Project directory
* @param {string} agentName - Agent name (e.g., "fred-commit-poet")
* @param {string} agentPath - Path to compiled agent (relative to project root)
* @param {Object} metadata - Agent metadata
* @param {Object} metadata - Agent metadata (unused, kept for compatibility)
* @returns {Object} Installation result
*/
async installCustomAgentLauncher(projectDir, agentName, agentPath, metadata) {
const roomodesPath = path.join(projectDir, this.configFile);
let existingContent = '';
const rooCommandsDir = path.join(projectDir, this.configDir, this.commandsDir);
await this.ensureDir(rooCommandsDir);
// Read existing .roomodes file
if (await this.pathExists(roomodesPath)) {
existingContent = await this.readFile(roomodesPath);
}
const commandName = `bmad-custom-agent-${agentName.toLowerCase()}`;
const commandPath = path.join(rooCommandsDir, `${commandName}.md`);
// Create custom agent mode entry
const slug = `bmad-custom-${agentName.toLowerCase()}`;
const modeEntry = ` - slug: ${slug}
name: 'BMAD Custom: ${agentName}'
description: |
Custom BMAD agent: ${agentName}
** IMPORTANT**: Run @${agentPath} first to load the complete agent!
This is a launcher for the custom BMAD agent "${agentName}". The agent will follow the persona and instructions from the main agent file.
prompt: |
@${agentPath}
always: false
permissions: all
`;
// Check if mode already exists
if (existingContent.includes(slug)) {
// Check if command already exists
if (await this.pathExists(commandPath)) {
return {
ide: 'roo',
path: this.configFile,
command: agentName,
path: path.join(this.configDir, this.commandsDir, `${commandName}.md`),
command: commandName,
type: 'custom-agent-launcher',
alreadyExists: true,
};
}
// Build final content
let finalContent = '';
if (existingContent) {
// Find customModes section or add it
if (existingContent.includes('customModes:')) {
// Append to existing customModes
finalContent = existingContent + modeEntry;
} else {
// Add customModes section
finalContent = existingContent.trim() + '\n\ncustomModes:\n' + modeEntry;
}
} else {
// Create new .roomodes file with customModes
finalContent = 'customModes:\n' + modeEntry;
}
// Read the custom agent file to extract metadata (same as regular agents)
const fullAgentPath = path.join(projectDir, agentPath);
const content = await this.readFile(fullAgentPath);
// Write .roomodes file
await this.writeFile(roomodesPath, finalContent);
// Extract metadata from agent content
const titleMatch = content.match(/title="([^"]+)"/);
const title = titleMatch ? titleMatch[1] : this.formatTitle(agentName);
const iconMatch = content.match(/icon="([^"]+)"/);
const icon = iconMatch ? iconMatch[1] : '🤖';
const whenToUseMatch = content.match(/whenToUse="([^"]+)"/);
const whenToUse = whenToUseMatch ? whenToUseMatch[1] : `Use for ${title} tasks`;
// Use unified method without extra content (clean)
await this.createAgentCommandFile(commandPath, {
name: title,
description: whenToUse,
agentPath: agentPath,
icon: icon,
});
return {
ide: 'roo',
path: this.configFile,
command: slug,
path: path.join(this.configDir, this.commandsDir, `${commandName}.md`),
command: commandName,
type: 'custom-agent-launcher',
};
}

View File

@ -60,7 +60,8 @@ class AgentCommandGenerator {
.replaceAll('{{name}}', agent.name)
.replaceAll('{{module}}', agent.module)
.replaceAll('{{description}}', agent.description || `${agent.name} agent`)
.replaceAll('{bmad_folder}', this.bmadFolderName);
.replaceAll('{bmad_folder}', this.bmadFolderName)
.replaceAll('{*bmad_folder*}', '{bmad_folder}');
}
/**

View File

@ -90,6 +90,11 @@ async function getAgentsFromDir(dirPath, moduleName) {
continue;
}
// Skip README files and other non-agent files
if (file.toLowerCase() === 'readme.md' || file.toLowerCase().startsWith('readme-')) {
continue;
}
if (file.includes('.customize.')) {
continue;
}
@ -101,6 +106,11 @@ async function getAgentsFromDir(dirPath, moduleName) {
continue;
}
// Only include files that have agent-specific content (compiled agents have <agent> tag)
if (!content.includes('<agent')) {
continue;
}
agents.push({
path: filePath,
name: file.replace('.md', ''),

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