Thank you for your interest in contributing to the AgentArea UI SDK! This document provides guidelines and information for contributors.
- Node.js 18 or higher
- pnpm 8 or higher
- Git
-
Fork and Clone
git clone https://github.com/your-username/agentarea-ui-sdk.git cd agentarea-ui-sdk -
Install Dependencies
pnpm install
-
Build Packages
pnpm build
-
Start Development
pnpm dev
-
Run Storybook
pnpm storybook
├── packages/
│ ├── core/ # Protocol-agnostic runtime library
│ └── react/ # React UI components and hooks
├── stories/ # Storybook component documentation
├── examples/ # Example implementations
├── docs/ # Documentation
└── .github/ # GitHub Actions workflows
-
Create a Branch
git checkout -b feature/your-feature-name
-
Make Your Changes
- Follow the existing code style
- Add tests for new functionality
- Update documentation as needed
-
Test Your Changes
pnpm build pnpm type-check pnpm test:build
-
Update Storybook
- Add stories for new components
- Update existing stories if needed
pnpm storybook
- TypeScript: All code must be written in TypeScript
- ESLint: Follow the existing ESLint configuration
- Prettier: Code formatting is handled automatically
- Naming: Use descriptive names and follow existing patterns
-
Accessibility First
- Include proper ARIA labels
- Support keyboard navigation
- Test with screen readers
-
Composable Design
- Follow Radix UI patterns
- Use compound components where appropriate
- Support customization through props
-
TypeScript
- Export all prop interfaces
- Use generic types where appropriate
- Document complex types
Currently, we rely on:
- Type checking:
pnpm type-check - Build testing:
pnpm test:build - Storybook: Interactive testing and documentation
Future testing additions:
- Unit tests with Jest/Vitest
- Integration tests
- Visual regression tests
Every component should have comprehensive Storybook stories:
import type { Meta, StoryObj } from '@storybook/react'
import { YourComponent } from '@agentarea/react'
const meta: Meta<typeof YourComponent> = {
title: 'Components/YourComponent',
component: YourComponent,
parameters: {
docs: {
description: {
component: 'Description of your component',
},
},
},
tags: ['autodocs'],
}
export default meta
type Story = StoryObj<typeof meta>
export const Default: Story = {
args: {
// Default props
},
}
export const Variant: Story = {
args: {
// Variant props
},
}- Document all public APIs
- Include usage examples
- Explain complex concepts
- Update README.md for major changes
When reporting bugs, please include:
- Description: Clear description of the issue
- Steps to Reproduce: Detailed steps to reproduce the bug
- Expected Behavior: What you expected to happen
- Actual Behavior: What actually happened
- Environment: OS, Node.js version, browser (if applicable)
- Code Sample: Minimal code that reproduces the issue
For feature requests, please provide:
- Use Case: Why is this feature needed?
- Proposed Solution: How should it work?
- Alternatives: What alternatives have you considered?
- Examples: Code examples or mockups if applicable
-
Before Submitting
- Ensure all tests pass
- Update documentation
- Add Storybook stories for new components
- Follow the existing code style
-
PR Description
- Clearly describe what the PR does
- Reference any related issues
- Include screenshots for UI changes
- List any breaking changes
-
Review Process
- PRs require at least one approval
- Address all review feedback
- Keep PRs focused and atomic
-
After Approval
- PRs are merged by maintainers
- Delete your feature branch after merge
We follow conventional commits:
type(scope): description
[optional body]
[optional footer]
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringtest: Adding or updating testschore: Maintenance tasks
feat(react): add Block.Protocol component
fix(core): resolve connection timeout issue
docs: update installation instructions
Releases are automated through GitHub Actions:
-
Version Bumping
pnpm version:patch # Bug fixes pnpm version:minor # New features pnpm version:major # Breaking changes
-
Tagging
git tag v1.0.0 git push origin v1.0.0
-
Automated Release
- GitHub Actions builds and publishes packages
- Creates GitHub release
- Deploys updated documentation
- Be Respectful: Treat everyone with respect and kindness
- Be Constructive: Provide helpful feedback and suggestions
- Be Patient: Remember that everyone is learning
- Be Inclusive: Welcome contributors of all backgrounds and skill levels
- GitHub Discussions: For questions and general discussion
- GitHub Issues: For bug reports and feature requests
- Discord: Join our community chat
- Email: Reach out to maintainers directly
Contributors are recognized in:
- GitHub contributors list
- Release notes for significant contributions
- Special mentions in documentation
Thank you for contributing to AgentArea UI SDK! 🚀