Thank you for your interest in contributing to @ainativekit/devtools! We welcome contributions from the community and are excited to work with you.
-
Fork the repository
- Click the "Fork" button at the top of the GitHub page
- Clone your fork locally:
git clone https://github.com/YOUR-USERNAME/devtools.git cd devtools
-
Install dependencies
npm install
-
Start development mode
npm run dev
npm run buildnpm run type-check- Build the package:
npm run build - Link locally:
npm link - In your test project:
npm link @ainativekit/devtools - Import and use the DevContainer to test your changes
cd examples/basic
npm install
npm run dev-
Create a feature branch
git checkout -b feature/your-feature-name
-
Make your changes
- Follow the existing code style
- Add JSDoc comments for new functions
- Update TypeScript types as needed
-
Test thoroughly
- Ensure
npm run buildsucceeds - Ensure
npm run type-checkpasses - Test with a real ChatGPT app if possible
- Ensure
-
Update documentation
- Update README.md if adding new features
- Add examples for new functionality
- Update type definitions
-
Commit your changes
git add . git commit -m "feat: add new feature description"
Follow Conventional Commits:
feat:New featurefix:Bug fixdocs:Documentation changesstyle:Code style changes (formatting, etc.)refactor:Code refactoringtest:Adding testschore:Maintenance tasks
-
Push to your fork
git push origin feature/your-feature-name
-
Open a Pull Request
- Go to the original repository
- Click "New Pull Request"
- Select your fork and branch
- Fill out the PR template
-
PR Description Should Include:
- What changes were made
- Why the changes are needed
- How to test the changes
- Screenshots (if UI changes)
-
Zero Widget Contamination
- Dev tools should never affect production widget code
- All debug features must be external to the widget
-
Generic Implementation
- DevContainer should work with ANY ChatGPT widget
- Avoid widget-specific logic in core components
-
AINativeKit Compatibility
- Use official AINativeKit hooks and events
- Follow AINativeKit design patterns
-
Type Safety
- All exports must be properly typed
- Use TypeScript strict mode
src/
├── components/ # React components
│ └── DevContainer.tsx
├── types/ # TypeScript definitions
│ └── index.ts
└── index.ts # Main exports
- Check existing issues to avoid duplicates
- Try to reproduce with the latest version
- Gather relevant information (browser, OS, error messages)
- Use the issue templates if available
- Provide a clear title and description
- Include steps to reproduce
- Add code examples if relevant
- Include error messages and screenshots
We love new ideas! To request a feature:
- Check if it's already requested
- Open an issue with
[Feature Request]prefix - Describe the use case
- Explain the expected behavior
- Provide examples if possible
- Use TypeScript for all new code
- Follow existing formatting (2 spaces, no semicolons in TS)
- Use meaningful variable names
- Add JSDoc comments for public APIs
- Use functional components with hooks
- Keep components focused and small
- Extract reusable logic to custom hooks
- Use proper TypeScript types for props
- Use CSS variables from AINativeKit
- Follow BEM naming convention for custom classes
- Keep styles scoped to components
Maintainers will handle releases following semantic versioning:
- Major (1.0.0): Breaking changes
- Minor (0.1.0): New features (backward compatible)
- Patch (0.0.1): Bug fixes
Contributors will be recognized in:
- The project README
- Release notes
- GitHub contributors page
- Open an issue with
[Question]prefix - Check existing issues and discussions
- Reach out to maintainers
Thank you for contributing to @ainativekit/devtools! 🚀