mirror of
https://github.com/R0m1k3/FlowReader.git
synced 2026-10-12 09:48:29 +02:00
feat(ux): fix focus swipe animation, button visibility and mobile scroll
This commit is contained in:
1 parent
22e002f47f
commit
9d41a74b36
466 files changed
+6111
-42082
No files matched your search
@@ -1,348 +0,0 @@
|
||||
# Module Installer Standards
|
||||
|
||||
**Purpose:** How the `_module-installer` folder works, including installer.js patterns and platform-specific configuration.
|
||||
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
||||
The `_module-installer` folder contains optional installation logic for your module. It runs AFTER the IDE installations and can:
|
||||
- Create directories specified in module.yaml
|
||||
- Copy assets or templates
|
||||
- Configure IDE-specific settings
|
||||
- Set up platform-specific integrations
|
||||
|
||||
---
|
||||
|
||||
## When Do You Need an Installer?
|
||||
|
||||
### Use an Installer When:
|
||||
|
||||
- Creating directories based on user configuration
|
||||
- Copying template files to the user's project
|
||||
- IDE-specific setup (Claude Code, Windsurf, Cursor, etc.)
|
||||
- Platform-specific integrations
|
||||
|
||||
### Skip the Installer When:
|
||||
|
||||
- Module only provides agents and workflows
|
||||
- No file operations needed
|
||||
- No IDE-specific configuration
|
||||
|
||||
---
|
||||
|
||||
## Folder Structure
|
||||
|
||||
```
|
||||
_module-installer/
|
||||
├── installer.js # Main installer (REQUIRED if folder exists)
|
||||
└── platform-specifics/ # IDE-specific handlers (optional)
|
||||
├── claude-code.js
|
||||
├── windsurf.js
|
||||
├── cursor.js
|
||||
└── ...
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## installer.js Pattern
|
||||
|
||||
### Function Signature
|
||||
|
||||
```javascript
|
||||
/**
|
||||
* Module Installer
|
||||
*
|
||||
* @param {Object} options - Installation options
|
||||
* @param {string} options.projectRoot - The root directory of the target project
|
||||
* @param {Object} options.config - Module configuration from module.yaml (resolved variables)
|
||||
* @param {Array<string>} options.installedIDEs - Array of IDE codes that were installed
|
||||
* @param {Object} options.logger - Logger instance for output
|
||||
* @returns {Promise<boolean>} - Success status (true = success, false = failure)
|
||||
*/
|
||||
async function install(options) {
|
||||
const { projectRoot, config, installedIDEs, logger } = options;
|
||||
|
||||
try {
|
||||
// Installation logic here
|
||||
logger.log(chalk.blue('Installing {Module Name}...'));
|
||||
|
||||
// ... your logic ...
|
||||
|
||||
logger.log(chalk.green('✓ {Module Name} installation complete'));
|
||||
return true;
|
||||
} catch (error) {
|
||||
logger.error(chalk.red(`Error installing module: ${error.message}`));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = { install };
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### What You Receive
|
||||
|
||||
| Parameter | Type | Description |
|
||||
|-----------|------|-------------|
|
||||
| `projectRoot` | string | Absolute path to the user's project root |
|
||||
| `config` | object | Resolved module.yaml variables |
|
||||
| `installedIDEs` | array | List of IDE codes installed (e.g., `['claude-code', 'windsurf']`) |
|
||||
| `logger` | object | Logger with `.log()`, `.warn()`, `.error()` methods |
|
||||
|
||||
The `config` object contains your module.yaml variables **after** user input:
|
||||
|
||||
```javascript
|
||||
// If module.yaml defined:
|
||||
// project_name:
|
||||
// prompt: "What is your project name?"
|
||||
// result: "{value}"
|
||||
|
||||
config.project_name // = user's input
|
||||
config.planning_artifacts // = resolved path
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Common Installation Tasks
|
||||
|
||||
### 1. Create Directories
|
||||
|
||||
```javascript
|
||||
const fs = require('fs-extra');
|
||||
const path = require('node:path');
|
||||
|
||||
// Create directory from config
|
||||
if (config['planning_artifacts']) {
|
||||
const dirConfig = config['planning_artifacts'].replace('{project-root}/', '');
|
||||
const dirPath = path.join(projectRoot, dirConfig);
|
||||
|
||||
if (!(await fs.pathExists(dirPath))) {
|
||||
logger.log(chalk.yellow(`Creating directory: ${dirConfig}`));
|
||||
await fs.ensureDir(dirPath);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 2. Copy Assets
|
||||
|
||||
```javascript
|
||||
const assetsSource = path.join(__dirname, 'assets');
|
||||
const assetsDest = path.join(projectRoot, 'docs');
|
||||
|
||||
if (await fs.pathExists(assetsSource)) {
|
||||
await fs.copy(assetsSource, assetsDest);
|
||||
logger.log(chalk.green('✓ Copied assets to docs/'));
|
||||
}
|
||||
```
|
||||
|
||||
### 3. IDE-Specific Configuration
|
||||
|
||||
```javascript
|
||||
// Handle IDE-specific configurations
|
||||
if (installedIDEs && installedIDEs.length > 0) {
|
||||
logger.log(chalk.cyan(`Configuring for IDEs: ${installedIDEs.join(', ')}`));
|
||||
|
||||
for (const ide of installedIDEs) {
|
||||
await configureForIDE(ide, projectRoot, config, logger);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Platform-Specific Handlers
|
||||
|
||||
### Pattern
|
||||
|
||||
Create files in `platform-specifics/{ide-code}.js`:
|
||||
|
||||
```javascript
|
||||
// platform-specifics/claude-code.js
|
||||
|
||||
/**
|
||||
* Configure module for Claude Code
|
||||
*/
|
||||
async function install(options) {
|
||||
const { projectRoot, config, logger, platformInfo } = options;
|
||||
|
||||
try {
|
||||
// Claude Code specific configuration
|
||||
logger.log(chalk.dim(' Configuring Claude Code integration...'));
|
||||
|
||||
// Your logic here
|
||||
|
||||
return true;
|
||||
} catch (error) {
|
||||
logger.warn(chalk.yellow(` Warning: ${error.message}`));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = { install };
|
||||
```
|
||||
|
||||
### Load from Main Installer
|
||||
|
||||
```javascript
|
||||
// installer.js
|
||||
const platformCodes = require(path.join(__dirname, '../../../../tools/cli/lib/platform-codes'));
|
||||
|
||||
async function configureForIDE(ide, projectRoot, config, logger) {
|
||||
// Validate platform code
|
||||
if (!platformCodes.isValidPlatform(ide)) {
|
||||
logger.warn(chalk.yellow(` Unknown platform: '${ide}'. Skipping.`));
|
||||
return;
|
||||
}
|
||||
|
||||
const platformName = platformCodes.getDisplayName(ide);
|
||||
const platformSpecificPath = path.join(__dirname, 'platform-specifics', `${ide}.js`);
|
||||
|
||||
try {
|
||||
if (await fs.pathExists(platformSpecificPath)) {
|
||||
const platformHandler = require(platformSpecificPath);
|
||||
|
||||
if (typeof platformHandler.install === 'function') {
|
||||
await platformHandler.install({ projectRoot, config, logger });
|
||||
logger.log(chalk.green(` ✓ Configured for ${platformName}`));
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
logger.warn(chalk.yellow(` Warning: Could not configure ${platformName}: ${error.message}`));
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Complete Example: BMM Installer
|
||||
|
||||
```javascript
|
||||
const fs = require('fs-extra');
|
||||
const path = require('node:path');
|
||||
const chalk = require('chalk');
|
||||
const platformCodes = require(path.join(__dirname, '../../../../tools/cli/lib/platform-codes'));
|
||||
|
||||
/**
|
||||
* BMM Module Installer
|
||||
*/
|
||||
async function install(options) {
|
||||
const { projectRoot, config, installedIDEs, logger } = options;
|
||||
|
||||
try {
|
||||
logger.log(chalk.blue('🚀 Installing BMM Module...'));
|
||||
|
||||
// Create output directory
|
||||
if (config['output_folder']) {
|
||||
const outputConfig = config['output_folder'].replace('{project-root}/', '');
|
||||
const outputPath = path.join(projectRoot, outputConfig);
|
||||
if (!(await fs.pathExists(outputPath))) {
|
||||
logger.log(chalk.yellow(`Creating output directory: ${outputConfig}`));
|
||||
await fs.ensureDir(outputPath);
|
||||
}
|
||||
}
|
||||
|
||||
// Create implementation artifacts directory
|
||||
if (config['implementation_artifacts']) {
|
||||
const storyConfig = config['implementation_artifacts'].replace('{project-root}/', '');
|
||||
const storyPath = path.join(projectRoot, storyConfig);
|
||||
if (!(await fs.pathExists(storyPath))) {
|
||||
logger.log(chalk.yellow(`Creating story directory: ${storyConfig}`));
|
||||
await fs.ensureDir(storyPath);
|
||||
}
|
||||
}
|
||||
|
||||
// IDE-specific configuration
|
||||
if (installedIDEs && installedIDEs.length > 0) {
|
||||
logger.log(chalk.cyan(`Configuring BMM for IDEs: ${installedIDEs.join(', ')}`));
|
||||
|
||||
for (const ide of installedIDEs) {
|
||||
await configureForIDE(ide, projectRoot, config, logger);
|
||||
}
|
||||
}
|
||||
|
||||
logger.log(chalk.green('✓ BMM Module installation complete'));
|
||||
return true;
|
||||
} catch (error) {
|
||||
logger.error(chalk.red(`Error installing BMM: ${error.message}`));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
async function configureForIDE(ide, projectRoot, config, logger) {
|
||||
if (!platformCodes.isValidPlatform(ide)) {
|
||||
logger.warn(chalk.yellow(` Warning: Unknown platform '${ide}'. Skipping.`));
|
||||
return;
|
||||
}
|
||||
|
||||
const platformSpecificPath = path.join(__dirname, 'platform-specifics', `${ide}.js`);
|
||||
|
||||
try {
|
||||
if (await fs.pathExists(platformSpecificPath)) {
|
||||
const platformHandler = require(platformSpecificPath);
|
||||
|
||||
if (typeof platformHandler.install === 'function') {
|
||||
await platformHandler.install({ projectRoot, config, logger });
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
logger.warn(chalk.yellow(` Warning: Could not load handler for ${ide}: ${error.message}`));
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = { install };
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Best Practices
|
||||
|
||||
### DO:
|
||||
- Return `true` for success, `false` for failure
|
||||
- Use chalk for colored output
|
||||
- Log what you're doing (create, copy, configure)
|
||||
- Handle errors gracefully with try/catch
|
||||
- Validate paths before creating directories
|
||||
|
||||
### DON'T:
|
||||
- Assume paths exist — check with `fs.pathExists()`
|
||||
- Overwrite user files without asking
|
||||
- Fail silently — log errors
|
||||
- Use absolute paths — build from `projectRoot`
|
||||
|
||||
---
|
||||
|
||||
## Available Platform Codes
|
||||
|
||||
Common IDE codes:
|
||||
- `claude-code` — Anthropic's Claude Code
|
||||
- `windsurf` — Windsurf IDE
|
||||
- `cursor` — Cursor AI IDE
|
||||
- `vscode` — Visual Studio Code
|
||||
|
||||
Use `platformCodes.isValidPlatform(ide)` to validate.
|
||||
|
||||
---
|
||||
|
||||
## Testing Your Installer
|
||||
|
||||
1. Create a test project
|
||||
2. Run `bmad install {your-module}`
|
||||
3. Verify directories are created
|
||||
4. Check that config variables are resolved correctly
|
||||
5. Test platform-specific handlers
|
||||
|
||||
---
|
||||
|
||||
## Quick Reference
|
||||
|
||||
| Task | Code Pattern |
|
||||
|------|--------------|
|
||||
| Create directory | `await fs.ensureDir(path)` |
|
||||
| Check if exists | `await fs.pathExists(path)` |
|
||||
| Copy files | `await fs.copy(src, dest)` |
|
||||
| Log info | `logger.log(chalk.blue('message'))` |
|
||||
| Log success | `logger.log(chalk.green('✓ message'))` |
|
||||
| Log warning | `logger.warn(chalk.yellow('warning'))` |
|
||||
| Log error | `logger.error(chalk.red('error'))` |
|
||||
@@ -10,7 +10,6 @@ A **BMAD module** is a self-contained package of functionality that extends the
|
||||
- **Agents** — AI personas with specialized expertise and menu-driven commands
|
||||
- **Workflows** — Structured processes for accomplishing complex tasks
|
||||
- **Configuration** — module.yaml for user customization
|
||||
- **Installation** — Optional installer.js for setup logic
|
||||
|
||||
---
|
||||
|
||||
@@ -143,12 +142,6 @@ Affects the entire BMAD framework and all modules.
|
||||
├── workflows/ # Workflow definitions (if any)
|
||||
│ └── {workflow-name}/
|
||||
│ └── workflow.md
|
||||
├── _module-installer/ # Installation logic (optional)
|
||||
│ ├── installer.js
|
||||
│ └── platform-specifics/
|
||||
│ ├── claude-code.js
|
||||
│ ├── windsurf.js
|
||||
│ └── ...
|
||||
└── {other folders} # Tasks, templates, data as needed
|
||||
```
|
||||
|
||||
@@ -209,16 +202,6 @@ Workflows are structured processes with:
|
||||
|
||||
---
|
||||
|
||||
### _module-installer/
|
||||
|
||||
Optional installation logic for:
|
||||
- Creating directories
|
||||
- Copying assets
|
||||
- IDE-specific configuration
|
||||
- Platform-specific setup
|
||||
|
||||
See: `module-installer-standards.md` for patterns.
|
||||
|
||||
---
|
||||
|
||||
## Module Type Decision Tree
|
||||
@@ -264,7 +247,7 @@ START: Creating a module
|
||||
Modules can depend on:
|
||||
- **Core BMAD** — Always available
|
||||
- **Other modules** — Specify in module.yaml as `dependencies:`
|
||||
- **External tools** — Document in README, handle in installer
|
||||
- **External tools** — Document in README
|
||||
|
||||
---
|
||||
|
||||
@@ -277,4 +260,4 @@ Modules can depend on:
|
||||
| What's required? | module.yaml, README.md |
|
||||
| Where do modules live? | `src/modules/{code}/` |
|
||||
| How do agents work? | Menu triggers → workflow/exec |
|
||||
| How does installation work? | module.yaml prompts + optional installer.js |
|
||||
| How does installation work? | module.yaml prompts |
|
||||
@@ -0,0 +1,254 @@
|
||||
---
|
||||
name: module-help-generate
|
||||
description: Generate or update module-help.csv for any BMad module with proper structure
|
||||
web_bundle: false
|
||||
|
||||
# Path variables (to be set by caller)
|
||||
modulePath: '{module_path}'
|
||||
moduleYamlFile: '{module_path}/module.yaml'
|
||||
moduleHelpCsvFile: '{module_path}/module-help.csv'
|
||||
workflowsDir: '{module_path}/workflows'
|
||||
agentsDir: '{module_path}/agents'
|
||||
---
|
||||
|
||||
# Module Help CSV Generator
|
||||
|
||||
**Goal:** Generate or update a `module-help.csv` file that serves as the central registry for all module functionality - workflows, agents, and commands.
|
||||
|
||||
**Your Role:** You are a Module Documentation Architect. You will analyze a module's structure and create a properly formatted CSV that enables discoverability and CLI integration.
|
||||
|
||||
---
|
||||
|
||||
## CRITICAL RULES (NO EXCEPTIONS)
|
||||
|
||||
- ALWAYS read existing `module-help.csv` first if it exists - update/validate rather than replace
|
||||
- ALWAYS read `module.yaml` to get module code and type
|
||||
- ALWAYS read ALL agent `.yaml` files to understand menu triggers
|
||||
- ALWAYS read ALL workflow `workflow.md` files to understand purpose
|
||||
- ALWAYS place `anytime` entries at the TOP with EMPTY sequence
|
||||
- ALWAYS place phased entries BELOW anytime entries
|
||||
- ALWAYS number phases starting at `-1` (phase-1, phase-2, phase-3...)
|
||||
- ALWAYS leave sequence EMPTY for `anytime` entries (user chooses, not ordered)
|
||||
- ALWAYS include sequence number for phased entries (defines order within phase)
|
||||
- ALWAYS use EMPTY `workflow-file` for agent-only menu triggers
|
||||
- ALWAYS include `agent` column for agent-based features
|
||||
- NEVER assume workflow paths - verify from actual file structure
|
||||
- ALWAYS search for and put the file at the root of the module ONLY
|
||||
|
||||
---
|
||||
|
||||
## CSV STRUCTURE (13 columns)
|
||||
|
||||
```
|
||||
module,phase,name,code,sequence,workflow-file,command,required,agent,options,description,output-location,outputs,
|
||||
```
|
||||
|
||||
| Column | Purpose | Rules |
|
||||
|--------|---------|-------|
|
||||
| `module` | Module code from `module.yaml` | Required |
|
||||
| `phase` | `anytime` or `phase-1`, `phase-2`, etc. | Phases start at -1 |
|
||||
| `name` | Display name of the feature | User-facing |
|
||||
| `code` | Short code for commands | Unique within module |
|
||||
| `sequence` | Order within phase | EMPTY for anytime, number for phases |
|
||||
| `workflow-file` | Path to workflow.md | EMPTY for agent-only |
|
||||
| `command` | Internal command name | Format: `{module_code}_{feature_code}` |
|
||||
| `required` | Whether required | Usually `false` |
|
||||
| `agent` | Associated agent name | From agent YAML metadata |
|
||||
| `options` | Mode or action type | e.g., "Create Mode", "Chat Mode" |
|
||||
| `description` | User-facing description | Explain what and when to use |
|
||||
| `output-location` | Where output goes | Folder name or EMPTY |
|
||||
| `outputs` | What is produced | Output type or EMPTY |
|
||||
|
||||
---
|
||||
|
||||
## PHASE AND SEQUENCING RULES
|
||||
|
||||
### 1. anytime
|
||||
- Use for: standalone features, agent menu triggers, unrelated utilities
|
||||
- Place at TOP of file
|
||||
- `sequence` column MUST BE EMPTY
|
||||
- User chooses what to run - no order
|
||||
|
||||
### 2. Phases (phase-1, phase-2, phase-3...)
|
||||
- Use for: sequential workflows, guided processes
|
||||
- Place BELOW anytime entries
|
||||
- Phases ALWAYS start at `-1` (not 0 or 1)
|
||||
- `sequence` defines order WITHIN phase (10, 20, 30...)
|
||||
- the name can be named differently than just phase but should be dash number at the end if sequence is needed
|
||||
|
||||
### 3. Module Integration Patterns
|
||||
|
||||
**Full module with phases:**
|
||||
```
|
||||
anytime entries (sequence empty)
|
||||
phase-1 entries (sequence 10, 20, 30...)
|
||||
phase-2 entries (sequence 10, 20, 30...)
|
||||
```
|
||||
|
||||
**Add-on to existing module:**
|
||||
```
|
||||
May only have phase-3 entries that integrate into another module's workflow
|
||||
Sequence numbers fit logically before/after existing items
|
||||
```
|
||||
|
||||
**Standalone/Unitary collections:**
|
||||
```
|
||||
All entries are anytime
|
||||
No sequence numbers
|
||||
User picks one as needed
|
||||
```
|
||||
|
||||
**Agent-only features:**
|
||||
```
|
||||
Empty workflow-file column
|
||||
Agent handles everything via its menu
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## EXECUTION SEQUENCE
|
||||
|
||||
### Step 1: Identify Target Module
|
||||
|
||||
Ask user:
|
||||
1. What is the path to the module?
|
||||
2. Or should we scan for modules in the workspace?
|
||||
|
||||
### Step 2: Read Module Configuration
|
||||
|
||||
Load and read:
|
||||
```
|
||||
{moduleYamlFile}
|
||||
```
|
||||
|
||||
Extract:
|
||||
- `code` - Module identifier
|
||||
- `type` - Module type (module, unitary, etc.)
|
||||
- `name` - Module display name
|
||||
|
||||
### Step 3: Check for Existing module-help.csv
|
||||
|
||||
Check if exists:
|
||||
```
|
||||
{moduleHelpCsvFile}
|
||||
```
|
||||
|
||||
**If exists:**
|
||||
- Read entire file
|
||||
- Parse all existing entries
|
||||
- Ask user: Update existing, validate, or regenerate?
|
||||
|
||||
**If not exists:**
|
||||
- Note: Will create new file
|
||||
- Proceed to discovery
|
||||
|
||||
### Step 4: Discover All Workflows
|
||||
|
||||
Scan the workflows directory:
|
||||
```
|
||||
{workflowsDir}
|
||||
```
|
||||
|
||||
For each workflow found:
|
||||
- Read the `workflow.md` file
|
||||
- Extract: name, description, goal, role
|
||||
- Note the relative path for CSV entry
|
||||
|
||||
### Step 5: Discover All Agents
|
||||
|
||||
Scan the agents directory:
|
||||
```
|
||||
{agentsDir}
|
||||
```
|
||||
|
||||
For each agent found:
|
||||
- Read the `.agent.yaml` file
|
||||
- Extract: metadata (name, title), persona, menu triggers
|
||||
- Identify agent-only triggers (no workflow route)
|
||||
- Identify workflow-routing triggers
|
||||
|
||||
### Step 6: Determine Phasing Strategy
|
||||
|
||||
Analyze the module and decide:
|
||||
|
||||
**Question for each workflow:**
|
||||
- Is this part of a sequential journey? → Use phases
|
||||
- Is this standalone/optional? → Use anytime
|
||||
- Can user do this anytime? → Use anytime
|
||||
|
||||
**For agent menu items:**
|
||||
- Does it route to a workflow? → Map to that workflow or anytime
|
||||
- Is it an inline action? → anytime, no workflow file
|
||||
|
||||
### Step 7: Generate CSV Content
|
||||
|
||||
Build the CSV following structure:
|
||||
|
||||
**Header:**
|
||||
```
|
||||
module,phase,name,code,sequence,workflow-file,command,required,agent,options,description,output-location,outputs,
|
||||
```
|
||||
|
||||
**Entry Rules:**
|
||||
1. ALL `anytime` entries FIRST - `sequence` EMPTY
|
||||
2. THEN phased entries - `phase-1`, `phase-2`, etc.
|
||||
3. Within phases, `sequence` orders execution (10, 20, 30...)
|
||||
4. Agent-only actions: empty `workflow-file`, specify `agent`
|
||||
|
||||
**Code Format:**
|
||||
- Command: `{module_code}_{feature_name}`
|
||||
- Keep codes short but memorable (2-3 letters usually)
|
||||
|
||||
**Description Guidance:**
|
||||
- Explain WHAT the feature does
|
||||
- Include WHEN to use it (especially for phased items)
|
||||
- For add-on modules: "Best used after X but before Y"
|
||||
|
||||
### Step 8: Present to User
|
||||
|
||||
Before writing:
|
||||
1. Show the CSV content in a readable table format
|
||||
2. Explain phasing decisions
|
||||
3. Highlight any agent-only entries
|
||||
4. Ask for confirmation or adjustments
|
||||
|
||||
### Step 9: Write File
|
||||
|
||||
On confirmation:
|
||||
```
|
||||
Write to: {moduleHelpCsvFile}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## EXAMPLE OUTPUT STRUCTURE
|
||||
|
||||
### Full Module with Phases (like mwm):
|
||||
```csv
|
||||
module,phase,name,code,sequence,workflow-file,command,required,agent,options,description,output-location,outputs,
|
||||
mwm,anytime,Chat with Wellness,CWC,,"mwm_chat",false,wellness-companion,Chat Mode,"Have a supportive conversation anytime",,,
|
||||
mwm,anytime,Quick Breathing,QB,,"mwm_breathing",false,meditation-guide,Breathing,"Quick 4-7-8 breathing exercise",,,
|
||||
mwm,phase-1,Daily Check In,DCI,10,_bmad/mwm/workflows/daily-checkin/workflow.md,mwm_daily_checkin,false,wellness-companion,Check In Mode,"Start your day with wellness check-in",mwm_output,"summary",
|
||||
mwm,phase-2,Wellness Journal,WJ,20,_bmad/mwm/workflows/wellness-journal/workflow.md,mwm_journal,false,wellness-companion,Journal Mode,"Reflect and track your wellness journey",mwm_output,"entry",
|
||||
```
|
||||
|
||||
### Unitary/Standalone Module (like bmad-custom):
|
||||
```csv
|
||||
module,phase,name,code,sequence,workflow-file,command,required,agent,options,description,output-location,outputs,
|
||||
bmad-custom,anytime,Quiz Master,QM,,"bmad_quiz",false,,Trivia,"Interactive trivia quiz with gameshow atmosphere",bmad_output,"results",
|
||||
bmad-custom,anytime,Wassup,WS,,"bmad_wassup",false,,Status,"Check uncommitted changes and suggest commits",bmad_output,"summary",
|
||||
bmad-custom,anytime,Write Commit,WC,,"bmad_write_commit",false,commit-poet,Write,"Craft a commit message from your changes",bmad_output,"message",
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## INITIALIZATION
|
||||
|
||||
To begin this workflow:
|
||||
|
||||
1. Ask user for the target module path if not provided
|
||||
2. Load and read `module.yaml` in the root of the target if it exists
|
||||
3. Check for existing `module-help.csv`
|
||||
4. Scan for all workflows and agents
|
||||
5. Generate CSV following all rules above
|
||||
6. Update the file and review with the user - never auto commit and push
|
||||
@@ -3,7 +3,7 @@ name: 'step-13-review'
|
||||
description: 'Read through the brief together, "Does this excite you?"'
|
||||
|
||||
nextStepFile: './step-14-finalize.md'
|
||||
briefTemplateFile: '../../templates/brief-template.md'
|
||||
briefTemplateFile: '../templates/brief-template.md'
|
||||
---
|
||||
|
||||
# Step 13: Review
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name: 'step-14-finalize'
|
||||
description: 'Final polish, output the brief document'
|
||||
|
||||
briefTemplateFile: '../../templates/brief-template.md'
|
||||
briefTemplateFile: '../templates/brief-template.md'
|
||||
bmbCreationsOutputFolder: '{bmb_creations_output_folder}'
|
||||
---
|
||||
|
||||
|
||||
@@ -4,10 +4,10 @@ description: 'Load brief or user write-up, validate completeness'
|
||||
|
||||
nextStepFile: './step-02-structure.md'
|
||||
continueFile: './step-01b-continue.md'
|
||||
agentSpecTemplate: '../../templates/agent-spec-template.md'
|
||||
workflowSpecTemplate: '../../templates/workflow-spec-template.md'
|
||||
moduleStandardsFile: '../../data/module-standards.md'
|
||||
moduleYamlConventionsFile: '../../data/module-yaml-conventions.md'
|
||||
agentSpecTemplate: '../data/agent-spec-template.md'
|
||||
workflowSpecTemplate: '../templates/workflow-spec-template.md'
|
||||
moduleStandardsFile: '../data/module-standards.md'
|
||||
moduleYamlConventionsFile: '../data/module-yaml-conventions.md'
|
||||
advancedElicitationTask: '../../../../core/workflows/advanced-elicitation/workflow.xml'
|
||||
partyModeWorkflow: '../../../../core/workflows/party-mode/workflow.md'
|
||||
---
|
||||
@@ -135,10 +135,10 @@ status: IN_PROGRESS
|
||||
|
||||
1. Directory structure (based on module type)
|
||||
2. module.yaml with install configuration
|
||||
3. _module-installer/ folder (if needed)
|
||||
4. Agent placeholder/spec files
|
||||
5. Workflow placeholder/spec files
|
||||
6. README.md and TODO.md
|
||||
3. Agent placeholder/spec files
|
||||
4. Workflow placeholder/spec files
|
||||
5. README.md and TODO.md
|
||||
6. module-help.csv (generated from specs)
|
||||
|
||||
"**Ready to start building?**"
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name: 'step-01b-continue'
|
||||
description: 'Handle workflow continuation for Create mode'
|
||||
|
||||
workflowFile: '../workflow.md'
|
||||
workflowFile: '../workflow-create-module.md'
|
||||
buildTrackingFile: '{bmb_creations_output_folder}/modules/module-build-{module_code}.md'
|
||||
---
|
||||
|
||||
@@ -61,11 +61,10 @@ Find the last completed step and route to the next one:
|
||||
|---------------|-----------|
|
||||
| step-01-load-brief | step-02-structure |
|
||||
| step-02-structure | step-03-config |
|
||||
| step-03-config | step-04-installer |
|
||||
| step-04-installer | step-05-agents |
|
||||
| step-05-agents | step-06-workflows |
|
||||
| step-06-workflows | step-07-docs |
|
||||
| step-07-docs | step-08-complete |
|
||||
| step-03-config | step-04-agents |
|
||||
| step-04-agents | step-05-workflows |
|
||||
| step-05-workflows | step-06-docs |
|
||||
| step-06-docs | step-07-complete |
|
||||
|
||||
### 5. Route to Next Step
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ name: 'step-02-structure'
|
||||
description: 'Create directory structure based on module type'
|
||||
|
||||
nextStepFile: './step-03-config.md'
|
||||
moduleStandardsFile: '../../data/module-standards.md'
|
||||
moduleStandardsFile: '../data/module-standards.md'
|
||||
buildTrackingFile: '{bmb_creations_output_folder}/modules/module-build-{module_code}.md'
|
||||
---
|
||||
|
||||
@@ -59,11 +59,8 @@ Load `{moduleStandardsFile}` and determine location:
|
||||
├── README.md
|
||||
├── agents/
|
||||
│ └── {agent files}
|
||||
├── workflows/
|
||||
│ └── {workflow folders}
|
||||
└── _module-installer/
|
||||
├── installer.js
|
||||
└── platform-specifics/
|
||||
└── workflows/
|
||||
└── {workflow folders}
|
||||
```
|
||||
|
||||
"**Location:** {target_location}"
|
||||
@@ -78,8 +75,6 @@ Load `{moduleStandardsFile}` and determine location:
|
||||
Create folders:
|
||||
- `{target_location}/agents/`
|
||||
- `{target_location}/workflows/`
|
||||
- `{target_location}/_module-installer/`
|
||||
- `{target_location}/_module-installer/platform-specifics/`
|
||||
|
||||
### 4. Update Build Tracking
|
||||
|
||||
@@ -105,5 +100,5 @@ Update `{buildTrackingFile}`:
|
||||
|
||||
✅ Directory structure created
|
||||
✅ Location based on module type
|
||||
✅ Folders: agents/, workflows/, _module-installer/
|
||||
✅ Folders: agents/, workflows/
|
||||
✅ Build tracking updated
|
||||
@@ -2,8 +2,8 @@
|
||||
name: 'step-03-config'
|
||||
description: 'Generate module.yaml with install questions'
|
||||
|
||||
nextStepFile: './step-04-installer.md'
|
||||
moduleYamlConventionsFile: '../../data/module-yaml-conventions.md'
|
||||
nextStepFile: './step-04-agents.md'
|
||||
moduleYamlConventionsFile: '../data/module-yaml-conventions.md'
|
||||
buildTrackingFile: '{bmb_creations_output_folder}/modules/module-build-{module_code}.md'
|
||||
targetLocation: '{build_tracking_targetLocation}'
|
||||
---
|
||||
|
||||
+6
-6
@@ -1,15 +1,15 @@
|
||||
---
|
||||
name: 'step-05-agents'
|
||||
name: 'step-04-agents'
|
||||
description: 'Create agent placeholder/spec files'
|
||||
|
||||
nextStepFile: './step-06-workflows.md'
|
||||
agentSpecTemplate: '../../templates/agent-spec-template.md'
|
||||
agentArchitectureFile: '../../data/agent-architecture.md'
|
||||
nextStepFile: './step-05-workflows.md'
|
||||
agentSpecTemplate: '../data/agent-spec-template.md'
|
||||
agentArchitectureFile: '../data/agent-architecture.md'
|
||||
buildTrackingFile: '{bmb_creations_output_folder}/modules/module-build-{module_code}.md'
|
||||
targetLocation: '{build_tracking_targetLocation}'
|
||||
---
|
||||
|
||||
# Step 5: Agent Specs
|
||||
# Step 4: Agent Specs
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
@@ -138,7 +138,7 @@ Iterate through each agent from the brief and create their spec file.
|
||||
### 5. Update Build Tracking
|
||||
|
||||
Update `{buildTrackingFile}`:
|
||||
- Add 'step-05-agents' to stepsCompleted
|
||||
- Add 'step-04-agents' to stepsCompleted
|
||||
- List all agent specs created
|
||||
|
||||
### 6. Report Success
|
||||
@@ -1,160 +0,0 @@
|
||||
---
|
||||
name: 'step-04-installer'
|
||||
description: 'Setup _module-installer folder and installer.js'
|
||||
|
||||
nextStepFile: './step-05-agents.md'
|
||||
moduleInstallerStandardsFile: '../../data/module-installer-standards.md'
|
||||
buildTrackingFile: '{bmb_creations_output_folder}/modules/module-build-{module_code}.md'
|
||||
targetLocation: '{build_tracking_targetLocation}'
|
||||
---
|
||||
|
||||
# Step 4: Module Installer
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
Setup the _module-installer folder and create installer.js if needed.
|
||||
|
||||
## MANDATORY EXECUTION RULES:
|
||||
|
||||
### Universal Rules:
|
||||
|
||||
- 🛑 NEVER generate content without user input
|
||||
- 📖 CRITICAL: Read the complete step file before taking any action
|
||||
- 🔄 CRITICAL: When loading next with 'C', ensure entire file is read
|
||||
- 📋 YOU ARE A FACILITATOR, not a content generator
|
||||
- ✅ Speak in `{communication_language}`
|
||||
|
||||
### Role Reinforcement:
|
||||
|
||||
- ✅ You are the **Module Builder** — installer expert
|
||||
- ✅ Not all modules need installers
|
||||
- ✅ Follow installer patterns
|
||||
|
||||
---
|
||||
|
||||
## MANDATORY SEQUENCE
|
||||
|
||||
### 1. Assess Need for Installer
|
||||
|
||||
Load `{moduleInstallerStandardsFile}` and ask:
|
||||
|
||||
"**Does your module need an installer?**"
|
||||
|
||||
Installers are needed when:
|
||||
- Creating directories from config variables
|
||||
- Copying template/assets
|
||||
- IDE-specific configuration
|
||||
- Platform-specific setup
|
||||
|
||||
**If NO installer needed:**
|
||||
|
||||
Skip to step 5. Folder structure already exists.
|
||||
|
||||
**If YES:** Continue to step 4.2
|
||||
|
||||
### 2. Determine Installer Requirements
|
||||
|
||||
"**What should the installer do?**"
|
||||
|
||||
- Create directories? (which variables)
|
||||
- Copy assets? (from where)
|
||||
- IDE configuration? (which IDEs)
|
||||
- Platform-specific setup?
|
||||
|
||||
### 3. Create installer.js
|
||||
|
||||
Create `{targetLocation}/_module-installer/installer.js`:
|
||||
|
||||
```javascript
|
||||
const fs = require('fs-extra');
|
||||
const path = require('node:path');
|
||||
const chalk = require('chalk');
|
||||
const platformCodes = require(path.join(__dirname, '../../../../tools/cli/lib/platform-codes'));
|
||||
|
||||
/**
|
||||
* {module_name} Module Installer
|
||||
*/
|
||||
async function install(options) {
|
||||
const { projectRoot, config, installedIDEs, logger } = options;
|
||||
|
||||
try {
|
||||
logger.log(chalk.blue('Installing {module_name}...'));
|
||||
|
||||
// Create directories
|
||||
if (config['{variable_name}']) {
|
||||
const dirConfig = config['{variable_name}'].replace('{project-root}/', '');
|
||||
const dirPath = path.join(projectRoot, dirConfig);
|
||||
if (!(await fs.pathExists(dirPath))) {
|
||||
logger.log(chalk.yellow(`Creating directory: ${dirConfig}`));
|
||||
await fs.ensureDir(dirPath);
|
||||
}
|
||||
}
|
||||
|
||||
// IDE-specific configuration
|
||||
if (installedIDEs && installedIDEs.length > 0) {
|
||||
for (const ide of installedIDEs) {
|
||||
await configureForIDE(ide, projectRoot, config, logger);
|
||||
}
|
||||
}
|
||||
|
||||
logger.log(chalk.green('✓ {module_name} installation complete'));
|
||||
return true;
|
||||
} catch (error) {
|
||||
logger.error(chalk.red(`Error installing module: ${error.message}`));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
async function configureForIDE(ide, projectRoot, config, logger) {
|
||||
if (!platformCodes.isValidPlatform(ide)) {
|
||||
logger.warn(chalk.yellow(`Unknown platform: '${ide}'. Skipping.`));
|
||||
return;
|
||||
}
|
||||
|
||||
const platformSpecificPath = path.join(__dirname, 'platform-specifics', `${ide}.js`);
|
||||
|
||||
try {
|
||||
if (await fs.pathExists(platformSpecificPath)) {
|
||||
const platformHandler = require(platformSpecificPath);
|
||||
if (typeof platformHandler.install === 'function') {
|
||||
await platformHandler.install({ projectRoot, config, logger });
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
logger.warn(chalk.yellow(`Warning: Could not configure ${ide}: ${error.message}`));
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = { install };
|
||||
```
|
||||
|
||||
Customize based on module requirements.
|
||||
|
||||
### 4. Platform-Specific Handlers (Optional)
|
||||
|
||||
If IDE-specific setup needed, ask which IDEs and create:
|
||||
- `{targetLocation}/_module-installer/platform-specifics/claude-code.js`
|
||||
- `{targetLocation}/_module-installer/platform-specifics/windsurf.js`
|
||||
- etc.
|
||||
|
||||
### 5. Update Build Tracking
|
||||
|
||||
Update `{buildTrackingFile}`:
|
||||
- Add 'step-04-installer' to stepsCompleted
|
||||
- Note: installer created or skipped
|
||||
|
||||
### 6. MENU OPTIONS
|
||||
|
||||
**Select an Option:** [C] Continue
|
||||
|
||||
- IF C: Update tracking, load `{nextStepFile}`
|
||||
- IF Any other: Help, then redisplay menu
|
||||
|
||||
---
|
||||
|
||||
## Success Metrics
|
||||
|
||||
✅ Assessed installer need
|
||||
✅ installer.js created (if needed)
|
||||
✅ Platform handlers created (if needed)
|
||||
✅ Build tracking updated
|
||||
+5
-5
@@ -1,14 +1,14 @@
|
||||
---
|
||||
name: 'step-06-workflows'
|
||||
name: 'step-05-workflows'
|
||||
description: 'Create workflow placeholder/spec files'
|
||||
|
||||
nextStepFile: './step-07-docs.md'
|
||||
workflowSpecTemplate: '../../templates/workflow-spec-template.md'
|
||||
nextStepFile: './step-06-docs.md'
|
||||
workflowSpecTemplate: '../templates/workflow-spec-template.md'
|
||||
buildTrackingFile: '{bmad_creations_output_folder}/modules/module-build-{module_code}.md'
|
||||
targetLocation: '{build_tracking_targetLocation}'
|
||||
---
|
||||
|
||||
# Step 6: Workflow Specs
|
||||
# Step 5: Workflow Specs
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
@@ -154,7 +154,7 @@ Iterate through each workflow from the brief and create their spec file.
|
||||
### 4. Update Build Tracking
|
||||
|
||||
Update `{buildTrackingFile}`:
|
||||
- Add 'step-06-workflows' to stepsCompleted
|
||||
- Add 'step-05-workflows' to stepsCompleted
|
||||
- List all workflow specs created
|
||||
|
||||
### 5. Report Success
|
||||
+6
-8
@@ -1,13 +1,13 @@
|
||||
---
|
||||
name: 'step-07-docs'
|
||||
name: 'step-06-docs'
|
||||
description: 'Generate README.md, TODO.md, and docs/ folder'
|
||||
|
||||
nextStepFile: './step-08-complete.md'
|
||||
nextStepFile: './step-07-complete.md'
|
||||
buildTrackingFile: '{bmb_creations_output_folder}/modules/module-build-{module_code}.md'
|
||||
targetLocation: '{build_tracking_targetLocation}'
|
||||
---
|
||||
|
||||
# Step 7: Documentation
|
||||
# Step 6: Documentation
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
@@ -102,8 +102,7 @@ The module supports these configuration options (set during installation):
|
||||
│ ├── workflows.md
|
||||
│ └── examples.md
|
||||
├── agents/
|
||||
├── workflows/
|
||||
└── _module-installer/
|
||||
└── workflows/
|
||||
```
|
||||
|
||||
---
|
||||
@@ -173,8 +172,7 @@ Development roadmap for {module_code} module.
|
||||
|
||||
- [ ] Test installation with `bmad install`
|
||||
- [ ] Verify module.yaml prompts work correctly
|
||||
- [ ] Test installer.js (if present)
|
||||
- [ ] Test IDE-specific handlers (if present)
|
||||
- [ ] Verify all agents and workflows are discoverable
|
||||
|
||||
---
|
||||
|
||||
@@ -363,7 +361,7 @@ This section provides practical examples for using {module_display_name}.
|
||||
### 4. Update Build Tracking
|
||||
|
||||
Update `{buildTrackingFile}`:
|
||||
- Add 'step-07-docs' to stepsCompleted
|
||||
- Add 'step-06-docs' to stepsCompleted
|
||||
- Note: README.md, TODO.md, and docs/ folder created
|
||||
|
||||
### 5. Report Success
|
||||
+35
-6
@@ -1,13 +1,15 @@
|
||||
---
|
||||
name: 'step-08-complete'
|
||||
name: 'step-07-complete'
|
||||
description: 'Finalize, offer to run validation'
|
||||
|
||||
buildTrackingFile: '{bmb_creations_output_folder}/modules/module-build-{module_code}.md'
|
||||
targetLocation: '{build_tracking_targetLocation}'
|
||||
moduleHelpGenerateWorkflow: '../module-help-generate.md'
|
||||
validationWorkflow: '../steps-v/step-01-validate.md'
|
||||
moduleHelpCsvFile: '{build_tracking_targetLocation}/module-help.csv'
|
||||
---
|
||||
|
||||
# Step 8: Complete
|
||||
# Step 7: Complete
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
@@ -30,7 +32,33 @@ Finalize the module build, update tracking, and offer to run validation.
|
||||
|
||||
## MANDATORY SEQUENCE
|
||||
|
||||
### 1. Final Build Summary
|
||||
### 1. Generate module-help.csv
|
||||
|
||||
"**🎯 Generating module-help.csv...**"
|
||||
|
||||
Load and execute the module-help-generate workflow:
|
||||
```
|
||||
{moduleHelpGenerateWorkflow}
|
||||
```
|
||||
|
||||
**Set these variables before loading:**
|
||||
- `modulePath: {targetLocation}`
|
||||
- `moduleYamlFile: {targetLocation}/module.yaml`
|
||||
- `moduleHelpCsvFile: {targetLocation}/module-help.csv`
|
||||
- `workflowsDir: {targetLocation}/workflows`
|
||||
- `agentsDir: {targetLocation}/agents`
|
||||
|
||||
**What this does:**
|
||||
- Scans all workflows in `{workflowsDir}/`
|
||||
- Scans all agents in `{agentsDir}/`
|
||||
- Generates `{moduleHelpCsvFile}` with proper structure:
|
||||
- `anytime` entries at top (no sequence)
|
||||
- Phased entries below (phase-1, phase-2, etc.)
|
||||
- Agent-only entries have empty `workflow-file`
|
||||
|
||||
**Wait for workflow completion** before proceeding.
|
||||
|
||||
### 2. Final Build Summary
|
||||
|
||||
"**🎉 Module structure build complete!**"
|
||||
|
||||
@@ -45,10 +73,10 @@ Finalize the module build, update tracking, and offer to run validation.
|
||||
| Agent specs | {count} | agents/ |
|
||||
| Workflow specs | {count} | workflows/ |
|
||||
| Configuration | 1 | module.yaml |
|
||||
| Help Registry | 1 | module-help.csv |
|
||||
| Documentation | 2 | README.md, TODO.md |
|
||||
| Installer | {yes/no} | _module-installer/ |
|
||||
|
||||
### 2. Update Build Tracking
|
||||
### 3. Update Build Tracking
|
||||
|
||||
Update `{buildTrackingFile}`:
|
||||
```yaml
|
||||
@@ -57,7 +85,7 @@ moduleCode: {module_code}
|
||||
moduleName: {name}
|
||||
moduleType: {type}
|
||||
targetLocation: {location}
|
||||
stepsCompleted: ['step-01-load-brief', 'step-02-structure', 'step-03-config', 'step-04-installer', 'step-05-agents', 'step-06-workflows', 'step-07-docs', 'step-08-complete']
|
||||
stepsCompleted: ['step-01-load-brief', 'step-02-structure', 'step-03-config', 'step-04-agents', 'step-05-workflows', 'step-06-docs', 'step-07-complete']
|
||||
created: {created_date}
|
||||
completed: {date}
|
||||
status: COMPLETE
|
||||
@@ -117,6 +145,7 @@ Validation checks:
|
||||
|
||||
## Success Metrics
|
||||
|
||||
✅ module-help.csv generated at module root
|
||||
✅ Build tracking marked COMPLETE
|
||||
✅ Summary presented to user
|
||||
✅ Next steps clearly explained
|
||||
@@ -3,7 +3,7 @@ name: 'step-01-load-target'
|
||||
description: 'Load target for editing'
|
||||
|
||||
nextStepFile: './step-02-select-edit.md'
|
||||
moduleStandardsFile: '../../data/module-standards.md'
|
||||
moduleStandardsFile: '../data/module-standards.md'
|
||||
---
|
||||
|
||||
# Step 1: Load Target (Edit Mode)
|
||||
|
||||
@@ -3,7 +3,7 @@ name: 'step-02-file-structure'
|
||||
description: 'Validate file structure compliance'
|
||||
|
||||
nextStepFile: './step-03-module-yaml.md'
|
||||
moduleStandardsFile: '../../data/module-standards.md'
|
||||
moduleStandardsFile: '../data/module-standards.md'
|
||||
validationReportOutput: '{validation_report_output}'
|
||||
---
|
||||
|
||||
@@ -40,7 +40,6 @@ Check based on target type:
|
||||
- [ ] README.md exists
|
||||
- [ ] agents/ folder exists (if agents specified)
|
||||
- [ ] workflows/ folder exists (if workflows specified)
|
||||
- [ ] _module-installer/ folder (if installer specified)
|
||||
|
||||
**For Briefs:**
|
||||
- [ ] Brief file exists
|
||||
|
||||
@@ -3,7 +3,7 @@ name: 'step-03-module-yaml'
|
||||
description: 'Validate module.yaml against conventions'
|
||||
|
||||
nextStepFile: './step-04-agent-specs.md'
|
||||
moduleYamlConventionsFile: '../../data/module-yaml-conventions.md'
|
||||
moduleYamlConventionsFile: '../data/module-yaml-conventions.md'
|
||||
validationReportOutput: '{validation_report_output}'
|
||||
targetPath: '{validation_target_path}'
|
||||
---
|
||||
|
||||
@@ -3,8 +3,8 @@ name: 'step-04-agent-specs'
|
||||
description: 'Validate agent specifications and built agents'
|
||||
|
||||
nextStepFile: './step-05-workflow-specs.md'
|
||||
agentSpecTemplate: '../../templates/agent-spec-template.md'
|
||||
agentArchitectureFile: '../../data/agent-architecture.md'
|
||||
agentSpecTemplate: '../data/agent-spec-template.md'
|
||||
agentArchitectureFile: '../data/agent-architecture.md'
|
||||
agentValidationWorkflow: '{project-root}/_bmad/bmb/workflows/agent/steps-v/step-01-validate.md'
|
||||
validationReportOutput: '{validation_report_output}'
|
||||
targetPath: '{validation_target_path}'
|
||||
|
||||
@@ -3,7 +3,7 @@ name: 'step-05-workflow-specs'
|
||||
description: 'Validate workflow specifications and built workflows'
|
||||
|
||||
nextStepFile: './step-06-documentation.md'
|
||||
workflowSpecTemplate: '../../templates/workflow-spec-template.md'
|
||||
workflowSpecTemplate: '../templates/workflow-spec-template.md'
|
||||
workflowValidationWorkflow: '{project-root}/_bmad/bmb/workflows/workflow/steps-v/step-01-validate.md'
|
||||
validationReportOutput: '{validation_report_output}'
|
||||
targetPath: '{validation_target_path}'
|
||||
|
||||
@@ -3,9 +3,10 @@ name: 'step-07-installation'
|
||||
description: 'Installation readiness check'
|
||||
|
||||
nextStepFile: './step-08-report.md'
|
||||
moduleInstallerStandardsFile: '../../data/module-installer-standards.md'
|
||||
moduleHelpGenerateWorkflow: '../module-help-generate.md'
|
||||
validationReportOutput: '{validation_report_output}'
|
||||
targetPath: '{validation_target_path}'
|
||||
moduleHelpCsvFile: '{validation_target_path}/module-help.csv'
|
||||
---
|
||||
|
||||
# Step 7: Installation Readiness
|
||||
@@ -29,35 +30,7 @@ Check if the module is ready for installation.
|
||||
|
||||
## MANDATORY SEQUENCE
|
||||
|
||||
### 1. Check Installer
|
||||
|
||||
**IF `_module-installer/` exists:**
|
||||
- [ ] `installer.js` present
|
||||
- [ ] Has valid `install()` function
|
||||
- [ ] Platform-specific handlers (if any IDEs supported)
|
||||
|
||||
**IF `_module-installer/` doesn't exist:**
|
||||
- Note: Module may not need installer
|
||||
- Check if this is intentional
|
||||
|
||||
### 2. Validate installer.js (if present)
|
||||
|
||||
Load `{moduleInstallerStandardsFile}` and check:
|
||||
|
||||
**Function Signature:**
|
||||
- [ ] `async function install(options)`
|
||||
- [ ] Accepts: projectRoot, config, installedIDEs, logger
|
||||
- [ ] Returns: Promise<boolean>
|
||||
|
||||
**Error Handling:**
|
||||
- [ ] Try/catch block present
|
||||
- [ ] Error logging present
|
||||
|
||||
**Platform Validation:**
|
||||
- [ ] Uses platformCodes for IDE validation
|
||||
- [ ] Graceful handling of unknown platforms
|
||||
|
||||
### 3. Check module.yaml Install Variables
|
||||
### 1. Check module.yaml Install Variables
|
||||
|
||||
**IF custom variables exist:**
|
||||
- [ ] All variables have prompts
|
||||
@@ -68,7 +41,22 @@ Load `{moduleInstallerStandardsFile}` and check:
|
||||
- [ ] Paths use `{project-root}/` prefix
|
||||
- [ ] Output paths are user-configurable
|
||||
|
||||
### 4. Module Type Installation
|
||||
### 2. Check module-help.csv
|
||||
|
||||
**CRITICAL:** Every module must have `module-help.csv` at its root.
|
||||
|
||||
**Check:**
|
||||
- [ ] `module-help.csv` exists at `{moduleHelpCsvFile}`
|
||||
- [ ] Has valid header: `module,phase,name,code,sequence,workflow-file,command,required,agent,options,description,output-location,outputs,`
|
||||
- [ ] `anytime` entries at TOP with EMPTY sequence
|
||||
- [ ] Phased entries BELOW anytime (phase-1, phase-2, etc.)
|
||||
- [ ] Agent-only entries have EMPTY `workflow-file`
|
||||
|
||||
**If missing:**
|
||||
- FAIL - Module is not ready for installation without help registry
|
||||
- Suggest running `{moduleHelpGenerateWorkflow}`
|
||||
|
||||
### 3. Module Type Installation
|
||||
|
||||
**IF Extension:**
|
||||
- [ ] `code:` matches base (for proper merge)
|
||||
@@ -78,7 +66,7 @@ Load `{moduleInstallerStandardsFile}` and check:
|
||||
- [ ] `global: true` or documented
|
||||
- [ ] Global impact is minimal/intentional
|
||||
|
||||
### 5. Record Results
|
||||
### 4. Record Results
|
||||
|
||||
Append to `{validationReportOutput}`:
|
||||
|
||||
@@ -87,15 +75,16 @@ Append to `{validationReportOutput}`:
|
||||
|
||||
**Status:** {PASS/FAIL/WARNINGS}
|
||||
|
||||
**Installer:** {present/missing} - {status}
|
||||
**Install Variables:** {count} variables
|
||||
**Install Variables:** {count} variables
|
||||
**Help Registry:** {present/missing} - {status}
|
||||
**Ready to Install:** {yes/no}
|
||||
|
||||
**Issues Found:**
|
||||
{list any issues}
|
||||
```
|
||||
|
||||
### 6. Auto-Proceed
|
||||
### 5. Auto-Proceed
|
||||
|
||||
"**✓ Installation readiness check complete.**"
|
||||
|
||||
@@ -108,6 +97,6 @@ Load `{nextStepFile}`
|
||||
## Success Metrics
|
||||
|
||||
✅ Installation readiness assessed
|
||||
✅ Installer validated (if present)
|
||||
✅ module-help.csv presence and structure validated
|
||||
✅ Module type compatibility checked
|
||||
✅ Results recorded
|
||||
@@ -0,0 +1,71 @@
|
||||
---
|
||||
name: create-module-brief
|
||||
description: Create product brief for BMAD module development
|
||||
web_bundle: true
|
||||
installed_path: '{project-root}/_bmad/bmb/workflows/module'
|
||||
briefWorkflow: './steps-b/step-01-welcome.md'
|
||||
---
|
||||
|
||||
# Create Module Brief
|
||||
|
||||
**Goal:** Collaboratively explore and design your module vision through creative discovery.
|
||||
|
||||
**Your Role:** You are the **Module Architect** — a specialist in BMAD module design. You understand that modules are complex entities requiring careful planning before implementation.
|
||||
|
||||
---
|
||||
|
||||
## WORKFLOW ARCHITECTURE
|
||||
|
||||
This uses **step-file architecture** for disciplined execution.
|
||||
|
||||
### Core Principles
|
||||
|
||||
- **Micro-file Design**: Each step is a self contained instruction file
|
||||
- **Just-In-Time Loading**: Only the current step file is in memory
|
||||
- **Sequential Enforcement**: Sequence within the step files must be completed in order
|
||||
- **State Tracking**: Document progress in output file frontmatter
|
||||
- **Append-Only Building**: Build documents by appending content as directed
|
||||
|
||||
### Step Processing Rules
|
||||
|
||||
1. **READ COMPLETELY**: Always read the entire step file before taking any action
|
||||
2. **FOLLOW SEQUENCE**: Execute all numbered sections in order
|
||||
3. **WAIT FOR INPUT**: If a menu is presented, halt and wait for user selection
|
||||
4. **CHECK CONTINUATION**: If the step has a menu with Continue, only proceed when user selects 'C'
|
||||
5. **SAVE STATE**: Update frontmatter before loading next step
|
||||
6. **LOAD NEXT**: When directed, read fully and follow the next step file
|
||||
|
||||
### Critical Rules
|
||||
|
||||
- 🛑 **NEVER** load multiple step files simultaneously
|
||||
- 📖 **ALWAYS** read entire step file before execution
|
||||
- 🚫 **NEVER** skip steps or optimize the sequence
|
||||
- 💾 **ALWAYS** update frontmatter when writing final output for a step
|
||||
- 🎯 **ALWAYS** follow exact instructions in step files
|
||||
- ⏸️ **ALWAYS** halt at menus and wait for input
|
||||
- 📋 **NEVER** create mental todo lists from future steps
|
||||
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with config `{communication_language}`
|
||||
|
||||
---
|
||||
|
||||
## INITIALIZATION SEQUENCE
|
||||
|
||||
### 1. Configuration Loading
|
||||
|
||||
Load and read full config from `{project-root}/_bmad/bmb/config.yaml` and resolve:
|
||||
|
||||
- `project_name`, `user_name`, `communication_language`, `document_output_language`, `bmb_creations_output_folder`
|
||||
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
|
||||
|
||||
### 2. Route to Brief Workflow
|
||||
|
||||
"**Brief Mode: Creating a module brief through exploratory, creative discovery.**"
|
||||
|
||||
Load, read completely, then execute `{briefWorkflow}` (steps-b/step-01-welcome.md)
|
||||
|
||||
---
|
||||
|
||||
## OUTPUT
|
||||
|
||||
**Brief mode produces:**
|
||||
- `module-brief-{code}.md` — Complete module vision document
|
||||
@@ -0,0 +1,86 @@
|
||||
---
|
||||
name: create-module
|
||||
description: Create a complete BMAD module with agents, workflows, and infrastructure
|
||||
web_bundle: true
|
||||
installed_path: '{project-root}/_bmad/bmb/workflows/module'
|
||||
createWorkflow: './steps-c/step-01-load-brief.md'
|
||||
---
|
||||
|
||||
# Create Module
|
||||
|
||||
**Goal:** Build a complete, installable BMAD module from a module brief.
|
||||
|
||||
**Your Role:** You are the **Module Architect** — a specialist in BMAD module design and implementation. You transform module visions into fully structured, compliant modules.
|
||||
|
||||
---
|
||||
|
||||
## WORKFLOW ARCHITECTURE
|
||||
|
||||
This uses **step-file architecture** for disciplined execution.
|
||||
|
||||
### Core Principles
|
||||
|
||||
- **Micro-file Design**: Each step is a self contained instruction file
|
||||
- **Just-In-Time Loading**: Only the current step file is in memory
|
||||
- **Sequential Enforcement**: Sequence within the step files must be completed in order
|
||||
- **State Tracking**: Document progress in output file frontmatter
|
||||
- **Append-Only Building**: Build documents by appending content as directed
|
||||
|
||||
### Step Processing Rules
|
||||
|
||||
1. **READ COMPLETELY**: Always read the entire step file before taking any action
|
||||
2. **FOLLOW SEQUENCE**: Execute all numbered sections in order
|
||||
3. **WAIT FOR INPUT**: If a menu is presented, halt and wait for user selection
|
||||
4. **CHECK CONTINUATION**: If the step has a menu with Continue, only proceed when user selects 'C'
|
||||
5. **SAVE STATE**: Update frontmatter before loading next step
|
||||
6. **LOAD NEXT**: When directed, read fully and follow the next step file
|
||||
|
||||
### Critical Rules
|
||||
|
||||
- 🛑 **NEVER** load multiple step files simultaneously
|
||||
- 📖 **ALWAYS** read entire step file before execution
|
||||
- 🚫 **NEVER** skip steps or optimize the sequence
|
||||
- 💾 **ALWAYS** update frontmatter when writing final output for a step
|
||||
- 🎯 **ALWAYS** follow exact instructions in step files
|
||||
- ⏸️ **ALWAYS** halt at menus and wait for input
|
||||
- 📋 **NEVER** create mental todo lists from future steps
|
||||
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with config `{communication_language}`
|
||||
|
||||
---
|
||||
|
||||
## INITIALIZATION SEQUENCE
|
||||
|
||||
### 1. Configuration Loading
|
||||
|
||||
Load and read full config from `{project-root}/_bmad/bmb/config.yaml` and resolve:
|
||||
|
||||
- `project_name`, `user_name`, `communication_language`, `document_output_language`, `bmb_creations_output_folder`
|
||||
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
|
||||
|
||||
### 2. Route to Create Workflow
|
||||
|
||||
"**Create Mode: Building a complete BMAD module from a module brief.**"
|
||||
|
||||
Ask: "Where is the module brief? Please provide the path to the module-brief-{code}.md file."
|
||||
|
||||
Then load, read completely, and execute `{createWorkflow}` (steps-c/step-01-load-brief.md)
|
||||
|
||||
---
|
||||
|
||||
## CONFIGURATION
|
||||
|
||||
This workflow references:
|
||||
- `{installed_path}/data/` — Module standards and templates
|
||||
- `{installed_path}/templates/` — Output templates
|
||||
|
||||
---
|
||||
|
||||
## OUTPUT
|
||||
|
||||
**Create mode produces:**
|
||||
- Module directory structure
|
||||
- `module.yaml` with install configuration
|
||||
- Agent placeholder/spec files
|
||||
- Workflow placeholder/spec files
|
||||
- `README.md` and `TODO.md`
|
||||
- `module-help.csv` (generated from specs)
|
||||
@@ -0,0 +1,66 @@
|
||||
---
|
||||
name: edit-module
|
||||
description: Edit existing BMAD modules while maintaining coherence
|
||||
web_bundle: true
|
||||
installed_path: '{project-root}/_bmad/bmb/workflows/module'
|
||||
editWorkflow: './steps-e/step-01-load-target.md'
|
||||
---
|
||||
|
||||
# Edit Module
|
||||
|
||||
**Goal:** Modify existing BMAD module briefs or module structures while maintaining coherence and compliance.
|
||||
|
||||
**Your Role:** You are the **Module Architect** — a specialist in BMAD module design and maintenance. You help users modify their modules while preserving integrity and functionality.
|
||||
|
||||
---
|
||||
|
||||
## WORKFLOW ARCHITECTURE
|
||||
|
||||
This uses **step-file architecture** for disciplined execution.
|
||||
|
||||
### Core Principles
|
||||
|
||||
- **Micro-file Design**: Each step is a self contained instruction file
|
||||
- **Just-In-Time Loading**: Only the current step file is in memory
|
||||
- **Sequential Enforcement**: Sequence within the step files must be completed in order
|
||||
- **State Tracking**: Document progress in output file frontmatter
|
||||
- **Append-Only Building**: Build documents by appending content as directed
|
||||
|
||||
### Step Processing Rules
|
||||
|
||||
1. **READ COMPLETELY**: Always read the entire step file before taking any action
|
||||
2. **FOLLOW SEQUENCE**: Execute all numbered sections in order
|
||||
3. **WAIT FOR INPUT**: If a menu is presented, halt and wait for user selection
|
||||
4. **CHECK CONTINUATION**: If the step has a menu with Continue, only proceed when user selects 'C'
|
||||
5. **SAVE STATE**: Update frontmatter before loading next step
|
||||
6. **LOAD NEXT**: When directed, read fully and follow the next step file
|
||||
|
||||
### Critical Rules
|
||||
|
||||
- 🛑 **NEVER** load multiple step files simultaneously
|
||||
- 📖 **ALWAYS** read entire step file before execution
|
||||
- 🚫 **NEVER** skip steps or optimize the sequence
|
||||
- 💾 **ALWAYS** update frontmatter when writing final output for a step
|
||||
- 🎯 **ALWAYS** follow exact instructions in step files
|
||||
- ⏸️ **ALWAYS** halt at menus and wait for input
|
||||
- 📋 **NEVER** create mental todo lists from future steps
|
||||
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with config `{communication_language}`
|
||||
|
||||
---
|
||||
|
||||
## INITIALIZATION SEQUENCE
|
||||
|
||||
### 1. Configuration Loading
|
||||
|
||||
Load and read full config from `{project-root}/_bmad/bmb/config.yaml` and resolve:
|
||||
|
||||
- `project_name`, `user_name`, `communication_language`, `document_output_language`, `bmb_creations_output_folder`
|
||||
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
|
||||
|
||||
### 2. Route to Edit Workflow
|
||||
|
||||
"**Edit Mode: Modifying an existing BMAD module brief or module structure.**"
|
||||
|
||||
Ask: "What would you like to edit? Please provide the path to the module brief or module directory."
|
||||
|
||||
Then load, read completely, and execute `{editWorkflow}` (steps-e/step-01-assess.md)
|
||||
@@ -0,0 +1,66 @@
|
||||
---
|
||||
name: validate-module
|
||||
description: Run compliance check on BMAD modules against best practices
|
||||
web_bundle: true
|
||||
installed_path: '{project-root}/_bmad/bmb/workflows/module'
|
||||
validateWorkflow: './steps-v/step-01-validate.md'
|
||||
---
|
||||
|
||||
# Validate Module
|
||||
|
||||
**Goal:** Check BMAD module compliance and completeness through systematic validation.
|
||||
|
||||
**Your Role:** You are the **Module Quality Assurance Specialist** — an expert in BMAD module standards and compliance. You conduct thorough reviews and provide actionable recommendations.
|
||||
|
||||
---
|
||||
|
||||
## WORKFLOW ARCHITECTURE
|
||||
|
||||
This uses **step-file architecture** for disciplined execution.
|
||||
|
||||
### Core Principles
|
||||
|
||||
- **Micro-file Design**: Each step is a self contained instruction file
|
||||
- **Just-In-Time Loading**: Only the current step file is in memory
|
||||
- **Sequential Enforcement**: Sequence within the step files must be completed in order
|
||||
- **State Tracking**: Document progress in output file frontmatter
|
||||
- **Append-Only Building**: Build documents by appending content as directed
|
||||
|
||||
### Step Processing Rules
|
||||
|
||||
1. **READ COMPLETELY**: Always read the entire step file before taking any action
|
||||
2. **FOLLOW SEQUENCE**: Execute all numbered sections in order
|
||||
3. **WAIT FOR INPUT**: If a menu is presented, halt and wait for user selection
|
||||
4. **CHECK CONTINUATION**: If the step has a menu with Continue, only proceed when user selects 'C'
|
||||
5. **SAVE STATE**: Update frontmatter before loading next step
|
||||
6. **LOAD NEXT**: When directed, read fully and follow the next step file
|
||||
|
||||
### Critical Rules
|
||||
|
||||
- 🛑 **NEVER** load multiple step files simultaneously
|
||||
- 📖 **ALWAYS** read entire step file before execution
|
||||
- 🚫 **NEVER** skip steps or optimize the sequence
|
||||
- 💾 **ALWAYS** update frontmatter when writing final output for a step
|
||||
- 🎯 **ALWAYS** follow exact instructions in step files
|
||||
- ⏸️ **ALWAYS** halt at menus and wait for input
|
||||
- 📋 **NEVER** create mental todo lists from future steps
|
||||
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with config `{communication_language}`
|
||||
|
||||
---
|
||||
|
||||
## INITIALIZATION SEQUENCE
|
||||
|
||||
### 1. Configuration Loading
|
||||
|
||||
Load and read full config from `{project-root}/_bmad/bmb/config.yaml` and resolve:
|
||||
|
||||
- `project_name`, `user_name`, `communication_language`, `document_output_language`, `bmb_creations_output_folder`
|
||||
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
|
||||
|
||||
### 2. Route to Validate Workflow
|
||||
|
||||
"**Validate Mode: Running compliance check on BMAD module.**"
|
||||
|
||||
Ask: "What would you like to validate? Please provide the path to the module brief or module directory."
|
||||
|
||||
Then load, read completely, and execute `{validateWorkflow}` (steps-v/step-01-validate.md)
|
||||
@@ -1,100 +0,0 @@
|
||||
---
|
||||
name: module
|
||||
description: Quad-modal workflow for creating BMAD modules (Brief + Create + Edit + Validate)
|
||||
web_bundle: true
|
||||
installed_path: '{project-root}/_bmad/bmb/workflows/module'
|
||||
---
|
||||
|
||||
# Module Workflow
|
||||
|
||||
The module workflow guides users through creating complete, installable BMAD modules through a quad-modal process: **Brief → Create → Edit → Validate**.
|
||||
|
||||
## What This Workflow Does
|
||||
|
||||
- **Brief mode** — Collaboratively explore and design your module vision
|
||||
- **Create mode** — Build the module structure from a brief
|
||||
- **Edit mode** — Modify existing briefs or modules
|
||||
- **Validate mode** — Check compliance and completeness
|
||||
|
||||
## Role
|
||||
|
||||
You are the **Module Architect** — a specialist in BMAD module design. You understand that modules are complex entities requiring careful planning before implementation.
|
||||
|
||||
---
|
||||
|
||||
## INITIALIZATION SEQUENCE
|
||||
|
||||
### 1. Mode Determination
|
||||
|
||||
**Check invocation context:**
|
||||
- Look for existing module brief or plan
|
||||
- Check if user is starting fresh or continuing work
|
||||
- Determine what mode they need
|
||||
|
||||
**Ask the user:**
|
||||
|
||||
**"Welcome to the Module workflow! What would you like to do?"**
|
||||
|
||||
- **[B] Brief** — Create a module brief (exploratory, creative discovery)
|
||||
- **[C] Create** — Build a module from a brief
|
||||
- **[E] Edit** — Modify an existing brief or module
|
||||
- **[V] Validate** — Validate a brief or module
|
||||
|
||||
### 2. Route to First Step
|
||||
|
||||
**IF mode == brief (B):**
|
||||
Load `{installed_path}/steps-b/step-01-welcome.md`
|
||||
|
||||
**IF mode == create (C):**
|
||||
Ask: "Where is the module brief?" → Load `{installed_path}/steps-c/step-01-load-brief.md`
|
||||
|
||||
**IF mode == edit (E):**
|
||||
Ask: "What would you like to edit?" → Load `{installed_path}/steps-e/step-01-assess.md`
|
||||
|
||||
**IF mode == validate (V):**
|
||||
Ask: "What would you like to validate?" → Load `{installed_path}/steps-v/step-01-validate.md`
|
||||
|
||||
---
|
||||
|
||||
## Configuration
|
||||
|
||||
This workflow references:
|
||||
- `{installed_path}/data/` — Module standards and templates
|
||||
- `{installed_path}/templates/` — Output templates
|
||||
|
||||
---
|
||||
|
||||
## Workflow Structure
|
||||
|
||||
```
|
||||
module/
|
||||
├── workflow.md # This file - mode routing
|
||||
├── data/ # Shared standards
|
||||
│ ├── module-standards.md
|
||||
│ ├── module-yaml-conventions.md
|
||||
│ ├── agent-architecture.md
|
||||
│ └── module-installer-standards.md
|
||||
├── templates/ # Output templates
|
||||
│ ├── brief-template.md
|
||||
│ ├── agent-spec-template.md
|
||||
│ └── workflow-spec-template.md
|
||||
├── steps-b/ # Brief mode (13 steps)
|
||||
├── steps-c/ # Create mode (8 steps)
|
||||
├── steps-e/ # Edit mode
|
||||
└── steps-v/ # Validate mode
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Output
|
||||
|
||||
**Brief mode produces:**
|
||||
- `module-brief-{code}.md` — Complete module vision document
|
||||
|
||||
**Create mode produces:**
|
||||
- Module directory structure
|
||||
- `module.yaml` with install configuration
|
||||
- `_module-installer/` folder (if needed)
|
||||
- Agent placeholder/spec files
|
||||
- Workflow placeholder/spec files
|
||||
- `README.md` and `TODO.md`
|
||||
Reference in new issue
Block a user