Introduce automated validation for agent YAML files using Zod to ensure
schema compliance across all agent definitions. This feature validates
17 agent files across core and module directories, catching structural
errors and maintaining consistency.
Schema Validation (tools/schema/agent.js):
- Zod-based schema validating metadata, persona, menu, prompts, and critical actions
- Module-aware validation: module field required for src/modules/**/agents/,
optional for src/core/agents/
- Enforces kebab-case unique triggers and at least one command target per menu item
- Validates persona.principles as array (not string)
- Comprehensive refinements for data integrity
CLI Validator (tools/validate-agent-schema.js):
- Scans src/{core,modules/*}/agents/*.agent.yaml
- Parses with js-yaml and validates using Zod schema
- Reports detailed errors with file paths and field paths
- Exits 1 on failures, 0 on success
- Accepts optional project_root parameter for testing
Testing (679 lines across 3 test files):
- test/test-cli-integration.sh: CLI behavior and error handling tests
- test/unit-test-schema.js: Direct schema validation unit tests
- test/test-agent-schema.js: Comprehensive fixture-based tests
- 50 test fixtures covering valid and invalid scenarios
- ESLint configured to support CommonJS test files
- Prettier configured to ignore intentionally broken fixtures
CI Integration (.github/workflows/lint.yaml):
- Renamed from format-check.yaml to lint.yaml
- Added schema-validation job running npm run validate:schemas
- Runs in parallel with prettier and eslint jobs
- Validates on all pull requests
Data Cleanup:
- Fixed src/core/agents/bmad-master.agent.yaml: converted persona.principles
from string to array format
Documentation:
- Updated schema-classification.md with validation section
- Documents validator usage, enforcement rules, and CI integration
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
- CI/CD disabled by default in forks to conserve resources
- Users can enable via ENABLE_CI_IN_FORK repository variable
- Added comprehensive Fork Guide documentation
- Updated README with Contributing section
- Created automation script for future implementations
Benefits:
- Saves GitHub Actions minutes across 1,600+ forks
- Cleaner fork experience for contributors
- Full control for fork owners
- PR validation still runs automatically
BREAKING CHANGE: CI/CD no longer runs automatically in forks.
Fork owners must set ENABLE_CI_IN_FORK=true to enable workflows.
Co-authored-by: Brian <bmadcode@gmail.com>
Co-authored-by: PinkyD <paulbeanjr@gmail.com>
- Allow workflow to continue even if push to main fails
- This is expected behavior with protected branches
- NPM publishing and GitHub releases will still work
- Fix version-bump.js to actually update package.json version
- Add tag existence check to prevent duplicate tag errors
- Remove semantic-release dependency from version bumping
- Add automatic release notes generation from commit history
- Categorize commits into Features, Bug Fixes, and Maintenance
- Include installation instructions and changelog links
- Add preview-release-notes script for testing
- Update GitHub release creation to use generated notes
- Remove automatic versioning and dual publishing strategy
- Delete release.yaml and promote-to-stable.yaml workflows
- Add manual-release.yaml for controlled releases
- Remove semantic-release dependencies and config
- Update all documentation to use npx bmad-method install
- Configure NPM to publish to @stable tag by default
- Users can now use simple npx bmad-method install command
- Check for existing git tags when calculating new version
- Automatically increment version if tag already exists
- Prevents workflow failure when tag v5.1.0 already exists
BREAKING CHANGE: Promote beta features to stable release for v5.0.0
This commit ensures the stable release gets properly published to NPM and GitHub releases.
- Add contents:write permission for GitHub Actions
- Configure git to use GITHUB_TOKEN for authentication
- Set remote URL with access token for push operations
- This should resolve the 403 permission denied error
- Add GitHub Actions workflow for one-click promotion to stable
- Supports patch/minor/major version bumps
- Automatically merges main to stable and handles version updates
- Eliminates manual git operations for stable releases
- Configure semantic-release for @beta and @latest tags
- Main branch publishes to @beta (bleeding edge)
- Stable branch publishes to @latest (production)
- Enable CI/CD workflow for both branches
- Update release workflow Node.js version from 18 to 20 to match package.json requirements
- Remove push trigger from Discord workflow to reduce notification spam
This should resolve the semantic-release content-length header error after org migration.