Skip to content

Latest commit

 

History

History
73 lines (53 loc) · 2.05 KB

File metadata and controls

73 lines (53 loc) · 2.05 KB

Contributing to Poirot

Thanks for your interest in contributing to Poirot! Here's how to get started.

Prerequisites

  • macOS 15.0+
  • Xcode 16.0+

Install SwiftLint and SwiftFormat via Homebrew:

brew install swiftlint swiftformat

Building

git clone https://github.com/LeonardoCardoso/Poirot.git
cd Poirot
brew install swiftlint swiftformat
open Poirot.xcodeproj

Build with Cmd+B in Xcode, or from the command line:

xcodebuild -scheme Poirot -destination 'platform=macOS' -skipMacroValidation build

Testing

Run the full test suite:

xcodebuild test -scheme Poirot -destination 'platform=macOS' -skipMacroValidation

Tests use Swift Testing (@Test, #expect, #require). We do not use XCTest for new tests.

Code Style

  • Swift 6 with MainActor default isolation — all types are implicitly @MainActor
  • SwiftLint runs automatically during build (see .swiftlint.yml)
  • SwiftFormat for formatting (see .swiftformat)
  • Use nonisolated only for file I/O or heavy computation
  • New service protocols get hand-written mocks in PoirotTests/Mocks/

Architecture

Poirot/Sources/
├── App/           # App entry point, ContentView, AppState
├── Models/        # Value-type structs (Project, Session, Message)
├── Protocols/     # Service protocols
├── Services/      # Concrete implementations + Environment DI
├── Theme/         # Design tokens (PoirotTheme)
└── Views/         # SwiftUI views organized by feature
  • Models — Plain structs, Sendable by default
  • Services — Protocol-first with EnvironmentValues injection
  • State@Observable with @State (not ObservableObject)
  • Icons — SF Symbols only, with symbol effects for stateful icons

Pull Requests

  1. Fork the repo and create a feature branch from main
  2. Make your changes with tests
  3. Ensure build passes with zero warnings
  4. Ensure all tests pass
  5. Ensure SwiftLint passes
  6. Open a PR against main