Contributing to Goose
Goose is an open-source project that welcomes contributions from developers to enhance its features, fix bugs, and improve documentation. This page outlines the guidelines for contributing, ensuring that the process is straightforward and maintains the project's quality and consistency.
Introduction
Contributors play a vital role in the evolution of Goose, a local AI agent designed for automating engineering tasks. To participate, individuals follow established best practices that align with the project's goals of flexibility, extensibility, and reliability. This includes understanding the codebase, adhering to coding standards, and participating in community discussions. The project uses GitHub for version control, and contributions typically involve forking the repository, making changes, and submitting pull requests.
Prerequisites
Before contributing, developers ensure they have the necessary tools and knowledge. Goose requires familiarity with modern development practices, including Node.js for its ecosystem, as the project involves building and publishing packages.
- Installation: First, follow the instructions in Installation to set up Goose on your machine. This step is crucial for testing changes locally.
- Quickstart: Review Quickstart to understand basic usage and run initial tests, which helps in verifying that your environment is correctly configured.
Additionally, developers install dependencies such as Git, Node.js, and pnpm, as these are essential for managing the project's monorepo structure.
Development Setup
To contribute effectively, developers set up a local development environment that mirrors the project's structure. This involves cloning the repository and installing dependencies.
- Clone the Repository: Fork the Goose repository on GitHub and clone it to your local machine:
git clone https://github.com/your-username/goose.git
cd goose
- Install Dependencies: Use pnpm to install all required packages:
pnpm install
- Run Tests: Before making changes, ensure the project builds and tests successfully. Developers run the test suite to verify their setup:
pnpm test
This setup allows contributors to work on features or fixes while ensuring compatibility with the existing codebase.
Making Changes
When contributing code, developers focus on clarity, maintainability, and alignment with Goose's design principles. The project emphasizes modular code, as seen in its handling of workflows and packages.
- Code Standards: Follow the project's conventions, such as using TypeScript for type safety and adhering to ESLint rules. For example, in workflows like the one for publishing to npm, changes must be precise to avoid breaking builds.
Here's an example of a simplified workflow step from the project's source, which contributors might modify:
- name: Publish to npm
if: inputs.dry-run != true && github.ref == 'refs/heads/main'
run: |
cd ui
pnpm publish -r --access public --no-git-checks
This code demonstrates how to handle publishing without relying on external actions, a design decision made to improve reliability.
- Versioning and Workflows: If changes involve packages, manage versions manually or via tools like Changesets. For instance, contributors bump versions as follows:
cd ui/acp
pnpm version patch
This approach ensures that updates do not disrupt dependencies, reflecting the project's strategy for maintaining stability.
- Testing Changes: Always include tests for new features or bug fixes. Use the project's testing framework to validate changes, as poor testing can lead to issues highlighted in Troubleshooting.
Submitting Contributions
Once changes are ready, developers submit them through pull requests, following a structured process to facilitate reviews.
- Branching: Create a new branch for your changes:
git checkout -b feature/your-feature-name
- Committing Changes: Write clear, descriptive commit messages. For example:
git commit -m "feat: add new AI agent capability for workflow automation"
- Pull Requests: Push your branch and create a pull request on GitHub. Include a detailed description of the changes, the problem they solve, and any relevant context. Reviewers check for code quality, adherence to standards, and potential impacts on features like those described in Features.
- Code Reviews: Expect feedback from maintainers. Address comments promptly, as this step ensures contributions align with the project's governance, detailed in Governance.
Documentation Contributions
Goose's documentation is vital for its usability, and contributors can improve pages like this one. When updating documentation, use Markdown formatting and link only to existing pages, such as Tutorials or Configuration.
For example, if adding a new tutorial section, structure it with headings and code examples, always closing code blocks as shown earlier.
Community and Communication
Engage with the Goose community to discuss ideas and get help. Join the Discord server mentioned in the project's README for real-time collaboration. Contributors report issues or seek clarification through GitHub, ensuring that all interactions are respectful and productive.
By following these guidelines, developers help Goose evolve while maintaining its core principles of automation and extensibility.
Recent changes
- Created: Added contributing guidelines for Goose project