Contributing
How to contribute to guardrail-sim
Contributing
We welcome contributions to guardrail-sim! Here's how to get started.
Development Setup
# Clone the repo
git clone https://github.com/jeffgreendesign/guardrail-sim
cd guardrail-sim
# Install dependencies
pnpm install
# Run tests
pnpm test
# Start development
pnpm devProject Structure
guardrail-sim/
├── packages/
│ ├── policy-engine/ # Core policy engine
│ ├── mcp-server/ # MCP server with 12 tools
│ ├── ucp-types/ # UCP type definitions
│ ├── insights/ # Policy health checks
│ └── simulation/ # Adversarial buyer personas + negotiation loop
├── apps/
│ └── website/ # Documentation site + playground
└── docs/ # MDX contentRunning Tests
# All tests
pnpm test
# With coverage
pnpm test:coverage
# Single package
pnpm --filter @guardrail-sim/policy-engine testCode Style
- We use ESLint and Prettier for formatting
- Run
pnpm lintto check for issues - Run
pnpm formatto auto-format - TypeScript strict mode is required
- Explicit return types on exported functions
Submitting Changes
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-feature) - Make your changes
- Run
pnpm lint && pnpm typecheck && pnpm testto ensure quality - Commit with a descriptive message (we use conventional commits)
- Push and open a Pull Request
Commit Messages
We follow Conventional Commits:
feat: add new constraint type for time windows
fix: correct margin calculation for volume discounts
docs: update getting started guide
chore: update dependencies