-
Notifications
You must be signed in to change notification settings - Fork 48
docs: add repository guidelines for agents #68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,32 @@ | ||||||
| # Repository Guidelines | ||||||
|
|
||||||
| ## Project Structure & Module Organization | ||||||
| - `V2er/` contains the SwiftUI app; feature views live in `View/`, state management in `State/`, and shared configuration (including `Version.xcconfig`) in `Config/`. | ||||||
| - `V2erTests/` hosts unit tests for reducers, services, and view models; `V2erUITests/` is reserved for UI automation suites. | ||||||
| - `fastlane/` holds release automation (`Fastfile`, `changelog_helper.rb`), while `scripts/` includes utilities such as `update-version.sh`. | ||||||
| - Asset bundles (`Assets.xcassets`, `Preview Content/`) and bundled web resources (`www/`) ship with the iOS target; marketing collateral lives in `website/`. | ||||||
|
|
||||||
| ## Build, Test, and Development Commands | ||||||
| ```bash | ||||||
| xcodebuild -project V2er.xcodeproj -scheme V2er -configuration Debug build # Local debug build | ||||||
| xcodebuild test -project V2er.xcodeproj -scheme V2er -destination 'platform=iOS Simulator,name=iPhone 14' # Unit/UI tests | ||||||
| fastlane beta # Validate changelog, bump build number, upload to TestFlight | ||||||
| fastlane distribute_beta # Distribute an existing TestFlight build to beta groups | ||||||
| ./scripts/update-version.sh 1.2.0 42 # Update MARKETING_VERSION and CURRENT_PROJECT_VERSION | ||||||
| ``` | ||||||
| Run automation from the repository root; Fastlane expects valid App Store Connect credentials in your environment. | ||||||
|
|
||||||
| ## Coding Style & Naming Conventions | ||||||
| - Follow Swift API Design Guidelines: `UpperCamelCase` for types, `lowerCamelCase` for values, and keep file-per-feature modules consistent with existing folders (e.g., add Feed views under `V2er/View/Feed/`). | ||||||
| - Indent with four spaces, prefer SwiftUI composition over UIKit, and scope helpers with `private` extensions to keep reducers and services focused. | ||||||
| - Keep reducers pure; network side effects belong in service layers under `V2er/State/Networking/`. | ||||||
|
|
||||||
| ## Testing Guidelines | ||||||
| - Mirror production code structure inside `V2erTests/`; create `FeatureNameTests.swift` alongside the feature reducer or service you touch. | ||||||
| - Use `xcodebuild test` (above) for local validation; set destinations to match CI simulators (iPhone 14, iOS 17) to avoid config drift. | ||||||
| - When adding UI work, include a smoke scenario in `V2erUITests/` or capture simulator screenshots for PR reviewers if automation is impractical. | ||||||
|
||||||
| - When adding UI work, include a smoke scenario in `V2erUITests/` or capture simulator screenshots for PR reviewers if automation is impractical. | |
| - When adding UI work, include a smoke scenario in `V2erUITests/` (name UI test files as `FeatureNameUITests.swift` for consistency) or capture simulator screenshots for PR reviewers if automation is impractical. If automating UI tests, use an Xcode Test Plan (`V2erUITests.xctestplan`) to organize scenarios unless the feature is trivial; this improves CI reliability and agent automation. |
Copilot
AI
Oct 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Commit guideline references 'conventional short prefix format' without enumerating allowed prefixes, which can lead to inconsistency. Recommend listing accepted prefixes (e.g., feat, fix, chore, docs, test, refactor, perf, ci) for clarity.
| - Adopt the conventional short prefix format from history, e.g., `chore: bump version to 1.1.18` or `fix(auth): handle MFA token refresh`; keep messages in English and under 72 characters. | |
| - Adopt the conventional short prefix format (accepted prefixes: `feat`, `fix`, `chore`, `docs`, `test`, `refactor`, `perf`, `ci`) as used in history, e.g., `chore: bump version to 1.1.18` or `fix(auth): handle MFA token refresh`; keep messages in English and under 72 characters. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The phrase 'file-per-feature modules' is ambiguous (could mean one file per feature or a directory-per-feature). Suggest rewording to clarify intent, e.g., 'keep each feature's views grouped under its existing folder (e.g., place new Feed views in
V2er/View/Feed/).'