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.
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 runis not configured; rely on Xcode orxcodebuildinstead.
- 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).
- XCTest is the primary framework. Add tests in matching
*Tests.swiftfiles insideClipTimerTests/. - Mirror production namespaces: e.g., tests for
TaskStorego inTaskStoreFormattingTests.swiftor related files. - Run
xcodebuild test(command above) before opening a PR. Aim to cover time parsing, persistence, and UI state transitions.
- 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.
- Branch from
develop:git checkout -b feature-short-desc develop. - Implement changes and update docs (
README.md,AGENTS.md, etc.) in the same branch. - Run tests locally:
xcodebuild test -scheme ClipTimer -project ClipTimer.xcodeproj -destination 'platform=macOS' -derivedDataPath ./DerivedData CODE_SIGNING_ALLOWED=NO. - Commit with an imperative message and push upstream:
git push --set-upstream origin feature-short-desc. - Open a PR with
gh pr create --base develop --head feature-short-desc, include summary + testing output. - Merge via GitHub once checks pass; let GitHub auto-delete the branch or run
git fetch --prune originlocally to clean up. - Switch back to
developandgit pullto stay current before starting the next task.
- Keep local
DerivedData/out of version control; it is generated byxcodebuild. - Do not commit signing certificates or provisioning profiles. Use
CODE_SIGNING_ALLOWED=NOfor local CI-style runs.