Skip to content

Commit a6f4275

Browse files
authored
docs: add repository guidelines for agents (#68)
1 parent fe6988c commit a6f4275

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

AGENTS.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Repository Guidelines
2+
3+
## Project Structure & Module Organization
4+
- `V2er/` contains the SwiftUI app; feature views live in `View/`, state management in `State/`, and shared configuration (including `Version.xcconfig`) in `Config/`.
5+
- `V2erTests/` hosts unit tests for reducers, services, and view models; `V2erUITests/` is reserved for UI automation suites.
6+
- `fastlane/` holds release automation (`Fastfile`, `changelog_helper.rb`), while `scripts/` includes utilities such as `update-version.sh`.
7+
- Asset bundles (`Assets.xcassets`, `Preview Content/`) and bundled web resources (`www/`) ship with the iOS target; marketing collateral lives in `website/`.
8+
9+
## Build, Test, and Development Commands
10+
```bash
11+
xcodebuild -project V2er.xcodeproj -scheme V2er -configuration Debug build # Local debug build
12+
xcodebuild test -project V2er.xcodeproj -scheme V2er -destination 'platform=iOS Simulator,name=iPhone 14' # Unit/UI tests
13+
fastlane beta # Validate changelog, bump build number, upload to TestFlight
14+
fastlane distribute_beta # Distribute an existing TestFlight build to beta groups
15+
./scripts/update-version.sh 1.2.0 42 # Update MARKETING_VERSION and CURRENT_PROJECT_VERSION
16+
```
17+
Run automation from the repository root; Fastlane expects valid App Store Connect credentials in your environment.
18+
19+
## Coding Style & Naming Conventions
20+
- 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/`).
21+
- Indent with four spaces, prefer SwiftUI composition over UIKit, and scope helpers with `private` extensions to keep reducers and services focused.
22+
- Keep reducers pure; network side effects belong in service layers under `V2er/State/Networking/`.
23+
24+
## Testing Guidelines
25+
- Mirror production code structure inside `V2erTests/`; create `FeatureNameTests.swift` alongside the feature reducer or service you touch.
26+
- Use `xcodebuild test` (above) for local validation; set destinations to match CI simulators (iPhone 14, iOS 17) to avoid config drift.
27+
- When adding UI work, include a smoke scenario in `V2erUITests/` or capture simulator screenshots for PR reviewers if automation is impractical.
28+
29+
## Commit & Pull Request Guidelines
30+
- 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.
31+
- Each PR should link the tracking issue, describe user-facing impact, list test evidence (`xcodebuild test`, simulator run), and attach before/after screenshots for UI changes.
32+
- Update `CHANGELOG.md` and `V2er/Config/Version.xcconfig` together; CI will block TestFlight lanes if the changelog entry is missing.

0 commit comments

Comments
 (0)