Skip to content

docs: add AGENTS.md for AI coding agents - #1127

Merged
Dor-bl merged 6 commits into
appium:mainfrom
Dor-bl:docs/agents-md
Sep 19, 2026
Merged

Dor-bl merged 6 commits into
appium:mainfrom
Dor-bl:docs/agents-md

Conversation

@Dor-bl

@Dor-bl Dor-bl commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

PR title

docs: add AGENTS.md for AI coding agents

Related issue

Closes # n/a

List of changes

  • Add a root AGENTS.md with guidance for AI coding agents (and humans): repository layout, build and test commands matching CI, coding guidelines, git workflow, PR title/template conventions, PR review rules, and steps for addressing review comments.
  • Add CLAUDE.md that imports AGENTS.md, so Claude Code loads the same guidance.

Types of changes

What types of changes are you proposing/introducing to the .NET client?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change that adds functionality or value)
  • Refactoring (non-breaking change that improves code without altering functionality)
  • Breaking change (fix or feature that would cause existing functionality not to work as expected)
  • New test coverage (non-breaking change that adds tests for existing, previously untested functionality)
  • Test fix (non-breaking change that improves test stability or correctness)
  • Chore/Maintenance (updates to build scripts, dependencies, or GitHub Actions)

Tests

Put an x in the boxes that apply

  • Unit tests
  • Integration tests
  • No automated tests (explain why below)

How they run: Documentation only (two Markdown files), no code or CI changes. Build/test commands in AGENTS.md were checked against unit-test.yml and functional-test.yml.

Documentation

  • Have you proposed a file change/PR with Appium to update documentation?
  • Not applicable (no user-facing behaviour change, e.g. tests, CI or maintenance only)

Details

Most AI coding tools (Codex, Cursor, Copilot coding agent, etc.) read AGENTS.md from the repo root; Claude Code reads CLAUDE.md, which here just imports AGENTS.md to keep a single source of truth.

Add repo-level guidance for AI coding agents covering layout, build and
test commands, git workflow, PR conventions, review and addressing
review comments. CLAUDE.md imports it so Claude Code picks it up too.
@Dor-bl
Dor-bl marked this pull request as ready for review September 17, 2026 04:39
Copilot AI lite review requested due to automatic review settings September 17, 2026 04:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

AGENTS.md contains inaccurate or incomplete test and environment instructions.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds shared guidance for AI coding agents and humans, with Claude Code importing AGENTS.md.

Changes:

  • Added repository, testing, workflow, and review guidance in AGENTS.md.
  • Added CLAUDE.md as a shared guidance import.
File summaries
File Summary Review notes
AGENTS.md Repository and contribution guidance Correct CI test coverage, platform filters, prerequisites, and local environment configuration.
CLAUDE.md Imports AGENTS.md No issues noted.
Review details

Suppressed comments (3)

AGENTS.md:29

  • The Android CI workflow uses FullyQualifiedName~Android|FullyQualifiedName~CustomCommand, but CustomCommandTests is in the root Appium.Net.Integration.Tests namespace. Following this example therefore skips those device tests, so the documented functional filter does not match CI. Include the CustomCommand alternative in the Android example or state the exact CI filter.
Functional tests are selected by namespace, e.g. `--filter "FullyQualifiedName~Android"` or
`"FullyQualifiedName~IOS"`. They need a running Appium server and a configured `test/integration/env.json`

AGENTS.md:29

  • The iOS example omits the --filter option, so copying it yields a bare quoted string rather than a dotnet test filter. Keep the option in both examples so the command is executable.
Functional tests are selected by namespace, e.g. `--filter "FullyQualifiedName~Android"` or
`"FullyQualifiedName~IOS"`. They need a running Appium server and a configured `test/integration/env.json`

AGENTS.md:30

  • Copying env.json.sample without changing it does not configure a local functional run: it leaves DEV false and the remote URI as http://<remoteurl>:<port>/. Env.ServerIsLocal() then selects that placeholder URI for tests that use it, causing them to fail; the existing integration README requires DEV=true for local runs. Please document the local versus remote values here.
(copy from `env.json.sample`; never commit `env.json`).
  • Files reviewed: 2/2 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread AGENTS.md Outdated
Comment thread AGENTS.md
Document the net48 Windows leg and the Appium prerequisite for the
no-device tests, use CI's exact Android/iOS filters (including
CustomCommand), and explain the env.json values needed for local and
remote runs.
Copilot AI review requested due to automatic review settings September 17, 2026 08:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Correct the two documented guidance issues in AGENTS.md.

Get a fresh assessment by requesting another Copilot review.

Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 2
  • Review effort level: Lite

Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Copilot AI review requested due to automatic review settings September 17, 2026 08:26
@Dor-bl

Dor-bl commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator Author

The android-tests (32, google_apis) failure is not caused by this PR. The PR only changes Markdown (AGENTS.md, CLAUDE.md), and main fails the same job the same way: the emulator's adb daemon won't connect, and then touch-action tests such as TouchByCoordinatesTestCase / SimpleTouchActionTestCase fail (runs 35181511237 and 35181480290 on main). #1126 did not fix it, and there is no other fix yet.

The three suppressed points in Copilot's review summary (CI's exact Android filter including CustomCommand, the missing --filter on the iOS example, and env.json values for local vs remote runs) are addressed in bc091a5, together with the two inline threads. Follow-ups are in 857aa80.


Generated by Claude Code

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved setup documentation issues in AGENTS.md need correction before approval.

Get a fresh assessment by requesting another Copilot review.

Review details

Suppressed comments (1)

AGENTS.md:35

  • This Windows-only invocation uses Bash \ continuations, but the Windows CI job runs PowerShell. Pasting it into the default Windows shell passes \ as an argument to dotnet test and fails; use a single-line invocation or PowerShell backticks for this cross-platform guide.
dotnet test ./test/integration/Appium.Net.Integration.Tests.csproj \
  --configuration Release --framework net48 \
  --filter "AppiumLocalServerLaunchingTest|DirectConnectTest|AppiumClientConfigTest"
  • Files reviewed: 2/2 changed files
  • Comments generated: 2
  • Review effort level: Lite

Comment thread AGENTS.md Outdated
Comment thread AGENTS.md
…ADME

Functional tests start Appium via AppiumLocalService, so the appium CLI
and the uiautomator2/xcuitest drivers must be installed locally, as CI
does. Also correct test/integration/README.md, which named isRemoteServer
while Env.ServerIsRemote() reads isRemoteAppiumServer.
Copilot AI review requested due to automatic review settings September 18, 2026 15:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Add the documented Android Espresso and macOS ffmpeg prerequisites and align the PR scope notes with the three-file diff.

Get a fresh assessment by requesting another Copilot review.

Review details

Suppressed comments (1)

test/integration/README.md:14

  • The PR description says this change contains only two Markdown files, but this README correction makes three changed files. Please update the change list and test notes so the described scope matches the actual diff.
- Update `env.json` set isRemoteAppiumServer=true
  • Files reviewed: 3/3 changed files
  • Comments generated: 2
  • Review effort level: Lite

Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
ElementTestEspresso needs the Espresso driver and IOS/ScreenRecordingTest
needs ffmpeg; both are installed by functional-test.yml and are matched by
the documented Android/iOS filters.
Copilot AI review requested due to automatic review settings September 18, 2026 22:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Address the unresolved Windows command-continuation nit in AGENTS.md.

Review effort: Lite
Findings: None

Resolved since last review (2)
Previously missed (1)

In code that hasn't changed since last review

Low severity Use PowerShell-compatible line continuation for Windows command

AGENTS.md:35

The Windows-only invocation is shown with Bash \ line continuations, but the default Windows PowerShell does not treat \ as a continuation, so copying this command produces an invalid argument/extra commands. Use a single-line command or PowerShell backticks for this Windows leg.

Copilot AI review requested due to automatic review settings September 19, 2026 21:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

Reviewed changes are documentation-only, with no approval-blocking issues.

Review effort: Lite
Findings: None

Resolved since last review (2)

@Dor-bl
Dor-bl merged commit d406e7c into appium:main Sep 19, 2026
5 of 7 checks passed
@Dor-bl

Dor-bl commented Sep 19, 2026

Copy link
Copy Markdown
Collaborator Author

Heads-up on the two red functional checks on e7842c5: neither is caused by this PR, which only reflows one Markdown line in AGENTS.md (both were green on the previous head, e40102a).

Both reproduce on main:

  • android-tests (32, google_apis) — emulator can't reach the adb daemon (Unable to connect to adb daemon on port: 5037). Same on main runs 35429765078 (f038562) and 35472913272 (d406e7c).
  • ios-tests — the same app-activation fixtures fail (CanActivateAppTest, CanActivateAppFromBackgroundTest, CanActivateAppWithTimeoutTest, CanActivateViaScriptAppTest, CanBackgroundApp). Same on main run 35429765078.

There is no fix on main yet to port into this PR, so I'm not making further changes here. Both need their own CI fix.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants