Skip to content

Latest commit

 

History

History
77 lines (53 loc) · 1.4 KB

File metadata and controls

77 lines (53 loc) · 1.4 KB

Contributing to TinyAI

First off, thanks for taking the time to contribute!

Philosophy

TinyAI's core principles:

  1. Stay tiny - Every byte counts. No unnecessary dependencies.
  2. Stay simple - If it needs a tutorial, it's too complex.
  3. TypeScript first - Types are features, not afterthoughts.

How to Contribute

Reporting Bugs

Open an issue with:

  • What you expected
  • What happened
  • Minimal reproduction code

Suggesting Features

Open an issue with:

  • The use case
  • Why existing solutions don't work
  • Proposed API (code example)

Pull Requests

  1. Fork the repo
  2. Create a branch: git checkout -b my-feature
  3. Make changes
  4. Run tests: npm test
  5. Check bundle size: npm run bench
  6. Commit: git commit -m "Add feature"
  7. Push: git push origin my-feature
  8. Open a PR

Bundle Size Rule

PRs that increase gzipped size by >500 bytes need justification. Run npm run bench before submitting.

Code Style

  • Use TypeScript
  • No any types (use unknown if needed)
  • Prefer functions over classes
  • Keep files under 200 lines

Development

# Install
npm install

# Build
npm run build

# Test
npm test

# Check bundle size
npm run bench

Adding a Provider

  1. Create src/providers/yourprovider.ts
  2. Implement the Provider interface
  3. Add to src/core/client.ts
  4. Add tests
  5. Update README

Questions?

Open an issue or start a discussion!