Thanks for your interest in contributing to AGENT_RULES!
- Bun v1.3+ (package manager and runtime)
# Clone the repo
git clone https://github.com/agentrules-sh/agentrules.git
cd agentrules
# Install dependencies
bun install
# Build all packages
bun run build
# Run tests
bun run testpackages/
├── cli/ # @agentrules/cli - Command-line interface
└── core/ # @agentrules/core - Shared types and utilities
# Build all packages
bun run build
# Run all tests
bun run test
# Type check
bun run typecheck
# Lint and format (auto-fix)
bun run check
# Run tests for a specific package
bun test packages/cli
bun test packages/coreFor active development on the CLI:
bun run --cwd packages/cli devWe use Biome for linting and formatting. Run bun run check to auto-fix issues.
Pre-commit hooks (via Husky) will automatically format staged files.
bun run test # All packages (via Turbo)
bun run --cwd packages/core test # Core only
bun run --cwd packages/cli test # CLI only- Fork the repo and create a branch from
main - Make your changes
- Add tests if applicable
- Run
bun run checkandbun run test - Submit a PR
For changes that affect published packages, add a changeset:
bun run changesetThis will prompt you to describe the change and select affected packages. Changesets are used to generate changelogs and determine version bumps.
@agentrules/core— Pure functions, no environment assumptions. Types, schemas, validation, registry building, bundle utilities.@agentrules/cli— User-facing interface. Handles file system, terminal UI, user prompts. Uses core for shared logic.
When adding features, consider:
- Does this belong in core (reusable across different clients)?
- Or in CLI (specific to the command-line interface)?
Open an issue if you have questions or want to discuss a feature before implementing.