Skip to content

Contributing

Nick edited this page Jul 28, 2026 · 1 revision

Contributing

Getting Started

  1. Fork the repository
  2. Clone your fork and follow Development Setup
  3. Create a feature branch from main
  4. Make your changes
  5. Run tests and typecheck (see Testing)
  6. Submit a pull request

Codebase Layout

The codebase is organized for readability. Key entry points:

  • Frontend: app/src/screens/ (main UI screens), app/src/components/ (shared components)
  • Backend routes: backend/app/routers/ (API endpoints)
  • Pipeline: backend/app/pipeline/ (the core Open-Write toolchain)
  • AI routing: backend/app/ai/ (provider resolution, prompt construction)

Coding Standards

Frontend (TypeScript)

  • Strict TypeScript with noUnusedLocals + noUnusedParameters
  • React 19 functional components with hooks
  • Tailwind CSS v4 for styling
  • Zustand for shared state
  • CodeMirror 6 for editor extensions

Backend (Python)

  • FastAPI + uvicorn
  • Type hints on all public functions
  • Pydantic models for request/response validation
  • Tests use pytest + pytest-asyncio (async_mode = "auto")

Canonical vs Reference Rule

  • backend/app/pipeline/ is the canonical runtime. Edit it.
  • openwrite/ is a frozen read-only reference of the upstream methodology. Do not edit gate logic there.

Before Submitting

  1. Run backend tests: cd backend && uv run pytest
  2. Run frontend tests: cd app && npm run test -- --run
  3. Typecheck: cd app && npx tsc --noEmit
  4. Lint: cd backend && uv run ruff check
  5. Ensure no secrets or API keys are committed

Issues and Discussions

  • Open an issue for bugs or feature requests
  • For larger changes, open an issue first to discuss direction
  • Pull requests are welcome

Clone this wiki locally