First off, thank you for considering contributing to Story UI! It's people like you that make Story UI such a great tool.
By participating in this project, you are expected to uphold our Code of Conduct: be respectful, inclusive, and constructive in all interactions.
We use Conventional Commits to automate our release process. All commit messages must follow this format:
<type>(<scope>): <subject>
The easiest way to create properly formatted commits is to use our interactive commit tool:
npm run commit
# or
git czThis will guide you through creating a properly formatted commit message.
If you prefer to write commits manually, follow this format:
# Examples
git commit -m "feat(cli): add new init command options"
git commit -m "fix(mcp): resolve memory leak in story generation"
git commit -m "docs: update README with new examples"feat: New featurefix: Bug fixdocs: Documentation only changesstyle: Code style changes (formatting, missing semicolons, etc.)refactor: Code changes that neither fix bugs nor add featuresperf: Performance improvementstest: Adding or updating testschore: Changes to build process or auxiliary toolsci: Changes to CI configuration files and scripts
cli: CLI commandsmcp: MCP serverui: Story UI panelgenerator: Story generation logicconfig: Configurationci: CI/CD pipelinedeps: Dependenciesdocs: Documentation
All commits are automatically validated by commitlint. If your commit message doesn't follow the convention, it will be rejected with a helpful error message.
Before creating bug reports, please check existing issues to avoid duplicates. When creating a bug report, include:
- A clear and descriptive title
- Steps to reproduce the issue
- Expected behavior vs actual behavior
- Your environment (OS, Node version, Storybook version)
- Screenshots if applicable
Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion, include:
- A clear and descriptive title
- A detailed description of the proposed functionality
- Why this enhancement would be useful
- Examples of how it would be used
- Fork the repo and create your branch from
main - Run
npm installto install dependencies - Make your changes
- Run
npm run buildto ensure everything compiles - Test your changes thoroughly
- Update documentation if needed
- Create commits using
npm run commit - Submit a pull request
# Clone your fork
git clone https://github.com/your-username/story-ui.git
cd story-ui
# Install dependencies
npm install
# Build the project
npm run build
# Run in development mode
npm run dev
# Create a commit
npm run commitstory-ui/
├── cli/ # CLI commands
├── mcp-server/ # MCP server implementation
├── story-generator/ # Story generation logic
├── templates/ # Component templates
└── src/ # Source files
To add support for a new design system:
- Add detection logic in
story-generator/configLoader.ts - Add configuration template in
cli/setup.ts - Add examples in the README
- Submit a PR with your changes
Before submitting a PR:
- Test the CLI commands work correctly
- Test story generation with various prompts
- Verify the setup process works smoothly
- Ensure TypeScript compilation succeeds
- Make sure all commits follow the conventional format
Releases are automated using semantic-release. When you merge a PR to main:
- Commits are analyzed to determine the version bump
- Version is updated in package.json
- CHANGELOG.md is updated
- A GitHub release is created
- The package is published to npm
Your commit messages directly control the versioning:
fix:triggers a patch release (1.0.1 → 1.0.2)feat:triggers a minor release (1.0.1 → 1.1.0)feat!:orBREAKING CHANGE:triggers a major release (1.0.1 → 2.0.0)
Feel free to open an issue for any questions about contributing!