Thank you for your interest in contributing to Agent Patterns! This document provides guidelines and instructions for contributing.
- Fork the repository
- Clone your fork:
git clone https://github.com/harshmathurx/agent-patterns.git - Install dependencies:
pnpm install - Create a new branch:
git checkout -b feature/your-feature-name
# Install dependencies
pnpm install
# Run playground
cd apps/playground && pnpm dev
# Run tests
pnpm test
# Type check
pnpm typecheck
# Lint
pnpm lint- Create a new directory in
patterns/with your pattern name - Add the required files:
component.tsx- React componentschema.ts- Zod schema with descriptionsexample.tsx- CopilotKit integration exampleREADME.md- Documentationpackage.json- Package configuration
- Follow the existing pattern structure
- Add tests in
__tests__/component.test.tsx - Update the playground to include your pattern
- TypeScript: Strict mode, no
anytypes - Components: Use
forwardRef, extendReact.HTMLAttributes - Schemas: All Zod schemas must have
.describe()for LLMs - Theming: Use CSS variables, no hardcoded colors
- Testing: Write tests for all new patterns
- Ensure all tests pass:
pnpm test - Ensure TypeScript compiles:
pnpm typecheck - Ensure linting passes:
pnpm lint - Update documentation if needed
- Create a pull request with a clear description
Use conventional commits:
feat:for new featuresfix:for bug fixesdocs:for documentationtest:for testsrefactor:for refactoring
Example: feat: add notification pattern
Open an issue or start a discussion on GitHub. We're happy to help!