Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
111 changes: 111 additions & 0 deletions src/modules/wds/_module-installer/install-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# Whiteport Design Studio Configuration

code: wds
name: "WDS: Whiteport Design Studio"
default_selected: false # This module will not be selected by default for new installations

header: "Whiteport Design Studio (WDS) Module"
subheader: "Configure the settings for the WDS design-first methodology"

# Core config values automatically inherited:
## user_name
## communication_language
## document_output_language
## output_folder
## bmad_folder
## install_user_docs
## kb_install

project_type:
prompt: "What type of project are you working on?"
default: "digital_product"
result: "{value}"
single-select:
- value: "digital_product"
label: "Digital Product - Web/mobile application or platform"
- value: "landing_page"
label: "Landing Page - Marketing or campaign page"
- value: "website"
label: "Website - Multi-page website or portal"
- value: "other"
label: "Other - Custom or specialized project"

design_system_mode:
prompt: "How will you manage design system components?"
default: "none"
result: "{value}"
single-select:
- value: "none"
label: "No Design System - Page-specific components only"
- value: "figma"
label: "Custom Figma Design System - Link to Figma components"
- value: "component_library"
label: "Component Library - Use shadcn/Radix/similar library"

methodology_version:
prompt: "Which WDS methodology version would you like to use?"
default: "wds-v6"
result: "{value}"
single-select:
- value: "wds-v6"
label: "WDS v6 (Recommended) - Modern numbered phases (1-8)"
- value: "wps2c-v4"
label: "WPS2C v4 (Legacy) - Letter-based phases (A-G)"
- value: "custom"
label: "Custom - Define your own methodology"

product_languages:
prompt: "Which languages will your product support? (Select all that apply)"
default: ["en"]
required: true
result: "{value}"
multi-select:
- value: "en"
label: "English"
- value: "sv"
label: "Swedish"
- value: "no"
label: "Norwegian"
- value: "da"
label: "Danish"
- value: "fi"
label: "Finnish"
- value: "de"
label: "German"
- value: "es"
label: "Spanish"
- value: "fr"
label: "French"
- value: "it"
label: "Italian"
- value: "pt"
label: "Portuguese"
- value: "nl"
label: "Dutch"
- value: "pl"
label: "Polish"
- value: "ru"
label: "Russian"
- value: "ja"
label: "Japanese"
- value: "zh"
label: "Chinese"
- value: "ko"
label: "Korean"
- value: "ar"
label: "Arabic"
- value: "other"
label: "Other"

design_experience:
prompt: "What is your design experience level?"
default: "intermediate"
result: "{value}"
single-select:
- value: "beginner"
label: "Beginner - New to UX design, provide detailed guidance"
- value: "intermediate"
label: "Intermediate - Familiar with design concepts, balanced approach"
- value: "expert"
label: "Expert - Experienced designer, be direct and efficient"

96 changes: 96 additions & 0 deletions src/modules/wds/_module-installer/installer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
const fs = require('fs-extra');
const path = require('node:path');
const chalk = require('chalk');

/**
* WDS Module Installer
* Creates the alphabetized folder structure for Whiteport Design Studio
*
* @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
* @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
*/
async function install(options) {
const { projectRoot, config, installedIDEs, logger } = options;

try {
logger.log(chalk.blue('🎨 Installing WDS Module...'));

// Create docs directory if it doesn't exist
const docsPath = path.join(projectRoot, 'docs');
if (!(await fs.pathExists(docsPath))) {
logger.log(chalk.yellow('Creating docs directory'));
await fs.ensureDir(docsPath);
}

// Create WDS alphabetized folder structure
const wdsFolders = [
'A-Product-Brief',
'B-Trigger-Map',
'C-Platform-Requirements',
'C-Scenarios',
'D-Design-System',
'E-PRD',
'F-Testing',
'G-Product-Development',
];

logger.log(chalk.cyan('Creating WDS folder structure...'));

for (const folder of wdsFolders) {
const folderPath = path.join(docsPath, folder);
if (!(await fs.pathExists(folderPath))) {
await fs.ensureDir(folderPath);
logger.log(chalk.dim(` ✓ ${folder}/`));
} else {
logger.log(chalk.dim(` → ${folder}/ (already exists)`));
}
}

// Create Design-Deliveries subfolder in E-PRD
const designDeliveriesPath = path.join(docsPath, 'E-PRD', 'Design-Deliveries');
if (!(await fs.pathExists(designDeliveriesPath))) {
await fs.ensureDir(designDeliveriesPath);
logger.log(chalk.dim(' ✓ E-PRD/Design-Deliveries/'));
}

// Create .gitkeep files to preserve empty directories
for (const folder of wdsFolders) {
const gitkeepPath = path.join(docsPath, folder, '.gitkeep');
if (!(await fs.pathExists(gitkeepPath))) {
await fs.writeFile(gitkeepPath, '# This file ensures the directory is tracked by git\n');
}
}

// Create .gitkeep in Design-Deliveries
const ddGitkeepPath = path.join(designDeliveriesPath, '.gitkeep');
if (!(await fs.pathExists(ddGitkeepPath))) {
await fs.writeFile(ddGitkeepPath, '# This file ensures the directory is tracked by git\n');
}

logger.log(chalk.green('✓ WDS folder structure created'));

// Handle IDE-specific configurations if needed
if (installedIDEs && installedIDEs.length > 0) {
logger.log(chalk.cyan(`Configuring WDS for IDEs: ${installedIDEs.join(', ')}`));
// WDS doesn't need IDE-specific configuration currently
logger.log(chalk.dim(' No IDE-specific configuration needed for WDS'));
}

logger.log(chalk.green('✓ WDS Module installation complete'));
logger.log(chalk.cyan('\n📋 Next steps:'));
logger.log(chalk.dim(' 1. Activate Saga (WDS Analyst) to start with Product Brief'));
logger.log(chalk.dim(' 2. Or activate Idunn (WDS PM) for Platform Requirements'));
logger.log(chalk.dim(' 3. Or activate Freya (WDS Designer) for UX Design'));

return true;
} catch (error) {
logger.error(chalk.red(`Error installing WDS module: ${error.message}`));
return false;
}
}

module.exports = { install };
Loading