BMAD-METHOD/tools
cx-noam-brendel d83ce5e21f fix(bmb): add module.yaml schema validation and fix #1288
## What
- Add Zod schema validation for module.yaml files
- Create test suite for module schema with 17 test fixtures
- Fix create-module workflow to make 'code' field requirements clearer

## Why
Fixes #1288 - The create-module workflow could produce module.yaml files
without the required 'code' field or with placeholder text like '{module_code}'.

## How
1. Created tools/schema/module.js with Zod validation for:
   - Required fields: code, name, header, subheader
   - Code format: kebab-case, 2-20 chars, starts with letter
   - Variable definitions with prompt/inherit patterns

2. Created tools/validate-module-schema.js CLI validator

3. Added npm scripts:
   - validate:modules - validates all module.yaml files
   - test:modules - runs module schema test suite

4. Updated BMB workflow instructions with explicit warnings about
   required fields in step-03-config.md and step-03-module-yaml.md

5. Added 17 test fixtures covering:
   - Missing required fields (code, name, header, subheader)
   - Invalid code formats (placeholder, uppercase, underscore, etc.)
   - Variable definitions (prompt, inherit, single-select, multi-select)

## Testing
- npm run test:modules - 17/17 tests pass
- npm run validate:modules - All 5 existing modules pass
- npm test - Full test suite passes
2026-01-14 13:28:41 +02:00
..
cli release: bump to v6.0.0-alpha.23 2026-01-11 13:16:49 +08:00
docs doc fixes 2025-12-29 09:36:54 +08:00
flattener feat: add documentation website with Docusaurus build pipeline (#1177) 2025-12-23 23:01:36 +08:00
lib feat: add documentation website with Docusaurus build pipeline (#1177) 2025-12-23 23:01:36 +08:00
maintainer feat: add Raven's Verdict PR review tool (#1054) 2025-12-07 14:13:33 -06:00
schema fix(bmb): add module.yaml schema validation and fix #1288 2026-01-14 13:28:41 +02:00
bmad-npx-wrapper.js fix: preserve user's cwd when running via npx 2025-10-29 09:31:38 -05:00
build-docs.js Add link auditor, reorganize documentation, and README update (#1277) 2026-01-10 02:55:33 +08:00
fix-doc-links.js Add link auditor, reorganize documentation, and README update (#1277) 2026-01-10 02:55:33 +08:00
format-workflow-md.js check alignment 2025-10-22 12:36:39 -05:00
migrate-custom-module-paths.js _cfg -> _config 2025-12-13 19:41:09 +08:00
platform-codes.yaml update package.json to resolve windows installer issue with inquirer version 2025-12-26 18:05:59 +08:00
validate-agent-schema.js we only need one yaml lib 2025-12-13 18:35:07 +08:00
validate-doc-links.js Add link auditor, reorganize documentation, and README update (#1277) 2026-01-10 02:55:33 +08:00
validate-module-schema.js fix(bmb): add module.yaml schema validation and fix #1288 2026-01-14 13:28:41 +02:00
validate-svg-changes.sh fix(bmm): remove stale validate-prd references (fixes #1030) (#1038) 2025-12-05 21:35:46 -06:00