Skip to content

Latest commit

 

History

History
44 lines (32 loc) · 1.82 KB

File metadata and controls

44 lines (32 loc) · 1.82 KB

Contributing to AgentOS Base

Thank you for your interest in contributing! ensuring code quality and consistency is our top priority.

🤝 Getting Started

  1. Fork the repository.
  2. Clone your fork locally.
  3. Install dependencies using make install in backend/.

📐 Code Style

We use Ruff for linting and formatting.

  • Linting: Run make lint before committing.
  • Formatting: Run make format to auto-fix style issues.
  • Type Hinting: We encourage type hints (MyPy).

🔀 Workflow

  1. Create a branch for your feature: git checkout -b feature/amazing-feature.
  2. Commit your changes: git commit -m "feat: Add amazing feature".
  3. Push to the branch: git push origin feature/amazing-feature.
  4. Open a Pull Request.

🏗️ Architecture Standards

  • API Design: Follow RESTful conventions. Use schemas/ for Pydantic models.
  • API Responses: MUST follow docs/API_RESPONSE_SPEC.md.
    • Backend: Use create_structured_error() from app.core.responses.
    • Frontend: All API calls MUST use apiFetch from utils/apiClient (enforced by ESLint).
  • Database: Use SQLAlchemy Async ORM. Changes require Alembic migrations.
  • Async: All I/O bound operations (DB, HTTP, File) MUST be async.
  • Services: Logic belongs in services/, not API routers.
  • Port Management: STRICT RULE. Before adding any new service or port binding:
    1. Consult docs/PORT_REGISTRY.md to find an available port.
    2. Register your new port in that document.
    3. NEVER hardcode ports; use environment variables with defaults matching the registry.

🧪 Testing

  • Add unit tests for new logic in tests/.
  • Run make test to ensure no regressions.