Skip to content

Latest commit

 

History

History
41 lines (34 loc) · 3.11 KB

File metadata and controls

41 lines (34 loc) · 3.11 KB

Repository Guidelines

Project Structure & Module Organization

  • ClipTimer/: SwiftUI app source (views, models, store, assets). Key files: TaskStore.swift, TaskEditorWindow.swift.
  • ClipTimerTests/: XCTest suite grouped by formatting, timer, UI behaviour. Mirrors production modules.
  • ClipTimer.xcodeproj/: Xcode project configuration. Schemes and build settings live here.
  • ClipTimerAutoPause/, ClipTimerTests/ClipTimerUITests/: helper targets. Avoid editing unless you know the build flow.

Build, Test, and Development Commands

  • open ClipTimer.xcodeproj: launches Xcode workspace for interactive development.
  • xcodebuild test -scheme ClipTimer -project ClipTimer.xcodeproj -destination 'platform=macOS' -derivedDataPath ./DerivedData CODE_SIGNING_ALLOWED=NO: command-line test run that bypasses code signing.
  • swift run is not configured; rely on Xcode or xcodebuild instead.

Coding Style & Naming Conventions

  • Swift files use 4-space indentation, camelCase for methods/variables, PascalCase for types.
  • Prefer SwiftUI compositional patterns and keep view structs small.
  • Comments should explain why an approach is taken, not restate the obvious.
  • Follow existing naming for tasks (TaskStore, TaskRow); new store helpers should read as verbs (e.g., replaceTasks).

Testing Guidelines

  • XCTest is the primary framework. Add tests in matching *Tests.swift files inside ClipTimerTests/.
  • Mirror production namespaces: e.g., tests for TaskStore go in TaskStoreFormattingTests.swift or related files.
  • Run xcodebuild test (command above) before opening a PR. Aim to cover time parsing, persistence, and UI state transitions.

Commit & Pull Request Guidelines

  • Commit messages tend to use imperative mood (Allow arithmetic expressions in task editor times). Keep them short, scoped, and English.
  • Include all impacted files in a single commit when possible; ensure README/Docs updates accompany feature changes.
  • PRs target develop. Provide a summary, testing notes, and link to relevant issues. Merge via GitHub after CI/tests succeed; delete feature branches post-merge.

Feature Workflow Example

  1. Branch from develop: git checkout -b feature-short-desc develop.
  2. Implement changes and update docs (README.md, AGENTS.md, etc.) in the same branch.
  3. Run tests locally: xcodebuild test -scheme ClipTimer -project ClipTimer.xcodeproj -destination 'platform=macOS' -derivedDataPath ./DerivedData CODE_SIGNING_ALLOWED=NO.
  4. Commit with an imperative message and push upstream: git push --set-upstream origin feature-short-desc.
  5. Open a PR with gh pr create --base develop --head feature-short-desc, include summary + testing output.
  6. Merge via GitHub once checks pass; let GitHub auto-delete the branch or run git fetch --prune origin locally to clean up.
  7. Switch back to develop and git pull to stay current before starting the next task.

Security & Configuration Tips

  • Keep local DerivedData/ out of version control; it is generated by xcodebuild.
  • Do not commit signing certificates or provisioning profiles. Use CODE_SIGNING_ALLOWED=NO for local CI-style runs.