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>
* feat: add OpenCode integration implementation plan for BMAD-METHOD
* installer(opencode): add OpenCode target metadata in install.config.yaml
* chore(deps): add comment-json for JSONC parsing in OpenCode integration
* feat(installer/opencode): implement setupOpenCode with minimal instructions merge and BMAD-managed agents/commands
* feat(installer): add OpenCode (SST) to IDE selector and CLI --ide help
* fix(opencode): align generated opencode.json(c) with schema (instructions as strings; agent.prompt; command.template; remove unsupported fields)
* feat(installer): enhance OpenCode setup with agent selection and prefix options
* fix: update configuration file references from `bmad-core/core-config.yaml` to `.bmad-core/core-config.yaml` across multiple agent and task files for consistency and clarity.
* refactor: streamline OpenCode configuration prompts and normalize instruction paths for agents and tasks
* feat: add tools property to agent definitions for enhanced functionality. Otherwise opencode consders the subagents as readonly
* feat: add extraction of 'whenToUse' from agents markdown files for improved agent configuration in opencode
* feat: enhance task purpose extraction from markdown files with improved parsing and cleanup logic
* feat: add collision warnings for non-BMAD-managed agent and command keys during setup
* feat: generate and update AGENTS.md for OpenCode integration with agent and task details
* feat: add compact AGENTS.md generator and JSON-only integration for OpenCode
* chore(docs): remove completed OpenCode integration implementation plans
* feat: enable default prefixes for agent and command keys to avoid collisions
* fix: remove unnecessary line breaks in 'whenToUse' descriptions for QA agents to mathc the rest of the agents definitions and improve programatic parsing of whenToUse prop
* fix: update OpenCode references to remove 'SST' for consistency across documentation and configuration
* fix: update agent mode from 'subagent' to 'all' for consistency in agent definitions
* fix: consolidate 'whenToUse' description format for clarity and consistent parsing
- Update various direct and transitive project dependencies.
- Remove the circular `bmad-method` self-dependency.
- Upgrade ESLint, Prettier, Jest, and other dev tools.
- Update semantic-release and related GitHub packages.
Co-authored-by: Kayvan Sylvan <kayvan@meanwhile.bm>
* feat(cli): move flatten command to installer and update docs
Refactor the flatten command from tools/cli.js to tools/installer/bin/bmad.js for better integration. Add support for custom input directory and improve error handling. Update documentation in README.md and working-in-the-brownfield.md to reflect new command usage. Also clean up package-lock.json and add it to .gitignore.
* chore: update gitignore and add package-lock.json for installer tool
Remove package-lock.json from root gitignore since it's now needed for the installer tool
Add package-lock.json with dependencies for the bmad-method installer
---------
Co-authored-by: Devin Stagner <devin@blackstag.family>
* fix: Update console.log for user-guide.md install path
Changed
IMPORTANT: Please read the user guide installed at docs/user-guilde.md
to
IMPORTANT: Please read the user guide installed at .bmad-core/user-guide.md
WHY: the actual install location of the user-guide.md is in the .bmad-core directory.
* chore: remove formatting configs and clean up gitignore
- Delete husky pre-commit hook and prettier config files
- Remove VS Code chat/copilot settings
- Reorganize and clean up gitignore entries