Thank you for your interest in contributing to Unit09 — a story-driven on-chain AI raccoon that consumes Solana code, turns it into modules, and evolves through forks created by the community.
This document explains how to set up your environment, the contribution workflow, coding standards, and expectations for issues, pull requests, and security disclosures.
Short version: Be respectful, keep changes focused, add tests, and explain what you are doing and why.
The Unit09 codebase is organized into several major areas:
contracts/— Solana on-chain program(s) written with Anchor.packages/— shared TypeScript packages (SDK, core engine, utilities).services/— backend services (API, worker, scheduler).cli/— theunit09command-line interface.apps/— dashboard and documentation frontends.examples/— sample projects and demo stacks.infra/— infrastructure (Docker, Kubernetes, Terraform, monitoring).docs/— documentation and technical reference material.
When you open an issue or a pull request, please mention which area you are working in so reviewers with the right expertise can take a look.
By participating in this project, you agree to:
- Treat all contributors and users with respect.
- Assume good intent but allow for mistakes.
- Keep discussions technical and constructive.
- Avoid harassment, personal attacks, or discriminatory behavior.
If you experience or witness unacceptable behavior, you can reach out to the maintainers privately via the communication channels listed in the repository README. The maintainers may take appropriate action, including moderation of issues and pull requests.
-
Fork the repository on GitHub.
-
Clone your fork locally:
git clone https://github.com/<your-username>/unit09.git cd unit09
-
Configure the upstream remote so you can sync with the main repository:
git remote add upstream https://github.com/unit09-labs/unit09.git
You will typically need:
- Node.js 20+
- pnpm or npm (we assume pnpm for performance)
- Rust stable toolchain
- Solana CLI
- Anchor CLI
- Docker (for running localnet and services)
- A supported operating system (Linux, macOS, or WSL on Windows)
Verify installation:
node -v
pnpm -v || npm -v
rustc -vV
solana --version
anchor --version
docker --versionFrom the repository root:
pnpm installIf you prefer npm, you can use it, but the lockfile and scripts may assume pnpm. Try to keep your environment consistent with the repository defaults.
cd contracts/unit09-program
anchor build
anchor testYou may want to run tests against localnet. See the docs under docs/ for
details.
The simplest way to try Unit09 end-to-end is the local demo stack:
cd examples/unit09-local-demo
docker compose up -d
# Optionally run a demo script
./scripts/run_localnet.sh demoYou can then work on changes while the stack is running.
If you plan to work on a non-trivial change, open an issue first to discuss:
- What problem you are solving.
- Why the existing behavior is not sufficient.
- Your proposed approach at a high level.
This helps avoid duplicated work and gives maintainers a chance to provide guidance before you invest significant effort.
From your local clone of your fork:
git checkout main
git pull upstream main
git checkout -b feature/my-descriptive-branch-nameBranch name examples:
fix/api-module-paginationfeat/engine-new-analyzerdocs/update-getting-started
Regularly rebase on the upstream main branch to keep your changes small and reduce merge conflicts:
git fetch upstream
git rebase upstream/mainIf you are not comfortable with rebase, you may use merge, but rebasing tends to produce cleaner history.
Commit messages should be clear and descriptive. A good commit message:
- Explains what changed.
- Explains why it changed when not obvious.
- Uses the imperative mood in the subject line.
Examples:
Fix module pagination in API responseAdd rust analyzer for multi-crate workspacesRefactor CLI config loading to use shared utils
Avoid generic messages such as fix or update without context.
If you want to follow a structured convention, a simplified form of Conventional Commits is recommended:
feat: ...fix: ...docs: ...refactor: ...test: ...chore: ...
This is helpful but not absolutely required.
- Prefer clarity over cleverness.
- Keep functions small and focused.
- Avoid unnecessary abstractions.
- Do not duplicate logic; share helpers where appropriate.
- Add comments where intent is not obvious, but do not comment the obvious.
- Follow standard Rust style using
rustfmt. - Use idiomatic Anchor patterns for accounts and instructions.
- Keep on-chain logic minimal and deterministic.
- Avoid heavy computation in the program; offload to the engine where possible.
- Add unit tests for new instructions and account types when practical.
You can run formatting and clippy:
cargo fmt
cargo clippy --all-targets --all-features -- -D warnings- Use TypeScript strict mode where possible.
- Prefer
typeandinterfaceto describe data structures. - Avoid
anyunless there is no reasonable alternative. - Keep promise chains simple; prefer
async/await. - Use
eslintandprettierif configured in the repo.
Typical lint command:
pnpm lint- Add or update tests for any behavior change.
- Keep tests deterministic and fast where possible.
- Use existing test helpers and fixtures in
contracts/testsandpackages/testing-utils.
When fixing a bug, try to add a test that fails before your change and passes after your change.
Documentation is as important as code. Contributions are welcome in:
docs/— main technical documentation.apps/docs-site/— rendered documentation site.- In-code documentation where it improves clarity.
When you change behavior, consider whether any of the following need updates:
getting-started.mdinstallation.mdconfiguration.mdworkflow.mdapi-reference.mdcli-usage.md
If you add a new feature, please at least update one relevant documentation file so that users can discover how to use it.
When you are ready to propose your changes:
-
Push your branch to your fork:
git push origin feature/my-descriptive-branch-name
-
Open a pull request from your branch to the main repository
mainbranch. -
Fill in the pull request template if one is provided. At minimum, include:
- A clear title.
- A short summary of what changed.
- Any breaking changes or migration notes.
- Testing steps (how you verified your changes).
-
Link related issues using keywords such as
Closes #123orFixes #456. -
Be responsive to reviewer feedback. If you disagree with a suggestion, explain your reasoning so you can find a good compromise.
Smaller, focused pull requests are easier to review and more likely to be merged quickly.
If you have a large change, consider splitting it into several smaller PRs:
- One that introduces core abstractions.
- One that wires them into existing code.
- One that updates documentation.
Maintainers will try to:
- Review PRs in a reasonable time frame.
- Provide clear, actionable feedback.
- Explain requested changes when not obvious.
You can help by:
- Keeping the scope focused.
- Writing good commit messages.
- Updating the PR description when scope changes.
If you discover a security vulnerability or a behavior that could put user funds, sensitive data, or infrastructure at risk:
- Do not open a public issue or discuss it in public channels.
- Contact the maintainers via the private security contact listed in the
repository (for example, a
SECURITY.mdfile or security email address). - Provide as much detail as possible, including:
- Steps to reproduce.
- Affected components or configurations.
- Any suggested mitigations.
The maintainers will:
- Acknowledge receipt of your report.
- Work on a fix or mitigation.
- Coordinate responsible disclosure if appropriate.
Because Unit09 is centered on modularization, contributions that extend the engine are especially welcome.
When adding a new analyzer under packages/core-engine/analyzers:
- Document which language or framework it targets.
- Provide test repositories or fixtures.
- Add tests that exercise typical and edge-case inputs.
- Write a short design note in
docs/engine-design.mdor a linked file explaining how your analyzer fits into the pipeline.
When adding generators under packages/core-engine/generators:
- Clearly describe what artifacts are generated and why.
- Make generation behavior configurable (for example, enabled or disabled per pipeline run).
- Ensure generated content is idempotent or clearly versioned.
Under examples/module-gallery, you can contribute:
- New example modules.
- Improved versions of existing ones.
- Additional documentation explaining trade-offs.
Each module should include a README.md that explains what it does, how it
is structured, and how it can be reused.
The storytelling aspect of Unit09 is part of its identity, but production code and documentation should remain professional and clear.
- Occasional references to the AI raccoon are welcome in docs and logs, as long as they do not obscure meaning.
- Avoid jargon or humor in error messages that must be parsed by tools.
- Keep user-facing text accessible to developers who are new to the project.
By contributing to this repository, you agree that your contributions will be
licensed under the same license that covers the rest of the project, as
described in the LICENSE file in the root of the repository.
If you need to contribute code under different licensing terms, please discuss this with the maintainers before opening a pull request.
Every contribution helps Unit09 become a more capable, more reliable, and more interesting AI raccoon for the Solana ecosystem.
Thank you for taking the time to improve the project — whether through code, documentation, testing, design, or discussion.