Thank you for your interest in contributing to AStack! This document provides guidelines and instructions for contributing to this project.
- Code of Conduct
- Development Setup
- Project Structure
- Contribution Workflow
- Pull Request Guidelines
- Coding Standards
- Testing
- Documentation
- Component Design Principles
By participating in this project, you agree to abide by our Code of Conduct. Please read it before contributing.
- Node.js >= 18
- pnpm 10.10.0 or later
-
Fork the repository
-
Clone your fork:
git clone https://github.com/YOUR_USERNAME/astack.git cd astack -
Install dependencies:
pnpm install
-
Build the packages:
pnpm build
-
Run tests:
pnpm test
AStack is a monorepo managed with pnpm workspaces, containing the following packages:
packages/core- Core framework functionalitypackages/components- Ready-to-use AI componentspackages/integrations- Integration with third-party servicespackages/tools- Utility tools for AStack applicationsexamples- Example applications and usage patternsapps- Full applications built with AStack
AStack uses the following branching strategy:
dev- Development branch where all new features and fixes are integratedmaster- Stable release branch, only updated for releases
-
Ensure you have the latest
devbranch:git checkout dev git pull origin dev
-
Create a new branch from
dev:git checkout -b feature/your-feature-name
-
Make your changes
-
Create a changeset to document your changes:
pnpm changeset
Follow the prompts to describe your changes. Be specific about what you've changed and why.
-
Commit your changes:
git commit -m "feat: add new feature"Please follow the Conventional Commits specification.
-
Push your branch:
git push origin feature/your-feature-name
-
Open a pull request against the
devbranch
- PR title should follow the Conventional Commits format
- Include a reference to related issues (if applicable)
- Include a clear description of the changes
- Include tests for new functionality
- Update documentation for API changes
- Ensure all tests pass and linting is clean
AStack follows strict coding standards to ensure consistency and maintainability:
- TypeScript for all code
- ESLint for code linting
- Prettier for code formatting
- Strongly typed interfaces
- Immutable data structures where possible
- Functional programming patterns
- Clear, descriptive naming
Run the linter before submitting:
pnpm lintWe strive for high test coverage. Please include tests for new features and bug fixes:
- Unit tests for individual components
- Integration tests for component interactions
- E2E tests for complete workflows (where applicable)
Run tests with:
pnpm testDocumentation is crucial for AStack:
- Add JSDoc comments to all public APIs
- Update README files when changing package functionality
- Add examples for new features
- Update website documentation for significant changes
When contributing new components, follow these principles:
- Components should inherit from the
Componentbase class - Components must have well-defined input and output ports
- Components should be reusable and composable
- Avoid unnecessary adaptation layers
- Components should be directly compatible with their integrations
- Keep APIs consistent across the framework
- Support standalone operation via
run()method - Support pipeline integration via the transform system
- Use semantic port naming
- Follow the established naming conventions
- Ensure proper type definitions
- Document the purpose and behavior of each port
If you have questions or need help, you can:
- Open an issue with your question
- Reach out to the maintainers
Thank you for contributing to AStack!