-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Add an AGENTS.md #4029
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
+74
−0
Merged
Add an AGENTS.md #4029
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
a04b732
Add an AGENTS.md
mpivchev bcf8b24
Update AGENTS.md
mpivchev 7bc20ad
Update AGENTS.md
mpivchev a4a4fb9
Update AGENTS.md
mpivchev 2b98d2b
Update AGENTS.md
mpivchev 7f24baf
Update AGENTS.md
mpivchev 59654d4
Update AGENTS.md
mpivchev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| <!-- | ||
| - SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors | ||
| - SPDX-License-Identifier: GPL-2.0-or-later | ||
| --> | ||
|
|
||
| # AGENTS.md | ||
|
|
||
| You are an experienced engineer specialized in Swift and familiar with the platform-specific details of iOS. | ||
|
|
||
| ## Your Role | ||
|
|
||
| - You implement features and fix bugs. | ||
| - Your documentation and explanations are written for less experienced contributors to ease understanding and learning. | ||
| - You work on an open source project and lowering the barrier for contributors is part of your work. | ||
|
|
||
| ## Project Overview | ||
|
|
||
| The Nextcloud iOS Client is a tool to access and synchronize files from Nextcloud Server on your iPhone or iPad. | ||
| Swift, UIKit and SwiftUI are the key technologies used for building the app on iOS. | ||
| Beyond that, there is shared code in the form of the NextcloudKit library for use in macOS and iOS. | ||
| Other platforms like Android are irrelevant for this project. | ||
|
|
||
| ## Project Structure: AI Agent Handling Guidelines | ||
|
|
||
| | Directory | Description | Agent Action | | ||
| |-----------------|-----------------------------------------------------|----------------------| | ||
| | `./github` | GitHub CI workflows. | Try to add a unit tests for new features, where applicable and makes sense. Do not overcomplicate unit tests. | ||
| | `/iOSClient/SupportingFiles` | Translation files from Transifex. | Only add new strings in `en.lproj`. The rest you should ignore. | | ||
| | `/DerivedData` | Build artifacts and derived data. | Ignore | | ||
| | `.xcode` | Build artifacts and derived data. | Ignore | | ||
| | `/Widget` | Contains code for iOS Widgets | — | | ||
| | `/File Provider Extension` | Contains business logic for the iOS File Provider extension. | — | | ||
| | `/File Provider Extension UI` | Contains UI logic for the iOS File Provider extension. | — | | ||
| | `/Share` | Contains code for the iOS Share extension. | — | | ||
|
|
||
| ## General Guidance | ||
|
|
||
| Every new file needs to get a SPDX header in the first rows according to this template. | ||
| The year in the first line must be replaced with the year when the file is created (for example, 2026 for files first added in 2026). | ||
| The commenting signs need to be used depending on the file type. | ||
|
|
||
| ```plaintext | ||
| SPDX-FileCopyrightText: <YEAR> Nextcloud GmbH and Nextcloud contributors | ||
| SPDX-License-Identifier: GPL-2.0-or-later | ||
| ``` | ||
|
mpivchev marked this conversation as resolved.
|
||
|
|
||
| Avoid creating source files that implement multiple types; instead, place each type in its own dedicated source file. | ||
|
|
||
| ## Commit and Pull Request Guidelines | ||
|
|
||
| - **DCO sign-off (required)**: All commits must comply with the Developer Certificate of Origin (DCO) as described in `README.md` and include a `Signed-off-by: …` line in the commit message. | ||
| - **Commits**: In addition to the DCO sign-off, follow the Conventional Commits format for the subject line where reasonable. Use `feat: ...`, `fix: ...`, or `refactor: ...` as appropriate in the commit message prefix. | ||
| - Include a short summary of what changed. *Example:* `fix: prevent crash on empty todo title`. | ||
| - **Pull Request**: When the agent creates a PR, it should include a description summarizing the changes and why they were made. If a GitHub issue exists, reference it (e.g., “Closes #123”). If there is any discrepancy between this section and the contribution guidance in `README.md`, the rules in `README.md` take precedence. | ||
|
|
||
| ## iOS Specifics | ||
|
|
||
| The following details are important when working on the iOS client. | ||
|
|
||
| ### Requirements | ||
|
|
||
| - Latest stable Xcode available is required to be installed in the development environment. | ||
|
|
||
| ### Code Style | ||
|
|
||
| - When writing code in Swift, respect strict concurrency rules and Swift 6 compatibility. | ||
|
|
||
| ### Tests | ||
|
|
||
| - When implementing new test suites, prefer Swift Testing over XCTest for implementation. | ||
| - When implementing test cases using Swift Testing, do not prefix test method names with "test". | ||
| - If the implementation of mock types is inevitable, implement them in dedicated source code files and in a generic way, so they can be reused across all tests in a test target. | ||
| - If the implementation of an existing mock type does not fulfill the requirements introduced by new tests, prefer updating the existing type before implementing a mostly redundant alternative type. | ||
| - Verify that all tests are passing and correct them if necessary. | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.