Skip to content

chore(docs): add AGENTS.md and CLAUDE.md for AI agent context (SDKS-5134)#54

Open
pingidentity-gaurav wants to merge 5 commits into
mainfrom
SDKS-5134-add-agents-md
Open

chore(docs): add AGENTS.md and CLAUDE.md for AI agent context (SDKS-5134)#54
pingidentity-gaurav wants to merge 5 commits into
mainfrom
SDKS-5134-add-agents-md

Conversation

@pingidentity-gaurav

@pingidentity-gaurav pingidentity-gaurav commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds AGENTS.md at the repo root — the open-standard context file for AI coding agents (Claude, Copilot, Gemini, Codex, etc.)
  • Adds CLAUDE.md as a one-line @AGENTS.md redirect per the ticket's acceptance criteria
  • Removes AGENTS.md from .gitignore so it is tracked going forward

What's in AGENTS.md

  • Package table (all 15 packages including rn-push)
  • Build/test commands, config file locations, Lefthook git hooks
  • Releases/Changesets workflow
  • Dual-architecture bridge pattern (Android + iOS layout, TypeScript bridge)
  • Code standards: Swift 6, Kotlin 2.x, TypeScript API conventions, error handling, logging
  • Native SDK verification guidance
  • Cross-platform parity rules (TODO-PARITY)
  • Documentation conventions (TSDoc, KDoc, Swift)
  • Testing requirements (unit, integration, PingTestRunner E2E with commands)
  • Licensing and Git safety rules

Summary by CodeRabbit

  • Documentation
    • Added repository-wide operating guidance for AI coding agents, including commands, release/version workflow, cross-platform native bridge conventions, coding/documentation standards, testing requirements, and licensing/security rules.
    • Added a licensing and attribution reference document for AI-assisted work.
  • Chores
    • Updated gitignore rules so AGENTS.md is no longer excluded from version control.

…134)

Adds the open-standard AGENTS.md at the repo root with comprehensive
context for AI coding agents: package table, build/test commands,
dual-arch bridge pattern, code standards, releases/Changesets workflow,
Lefthook hooks, and E2E testing guidance.

Adds CLAUDE.md as a one-line redirect to AGENTS.md.

Removes AGENTS.md from .gitignore so it is tracked going forward.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6599bc19-8f4f-4726-964f-c00d00fb7727

📥 Commits

Reviewing files that changed from the base of the PR and between 440b29b and 389e623.

📒 Files selected for processing (2)
  • AGENTS.md
  • CLAUDE.md
✅ Files skipped from review due to trivial changes (1)
  • CLAUDE.md

📝 Walkthrough

Walkthrough

AGENTS.md is removed from .gitignore and added as a tracked repository guide. CLAUDE.md is added as a short file that points agents to AGENTS.md.

Changes

AI Agent Guidance Documentation

Layer / File(s) Summary
.gitignore unignore and CLAUDE.md entry point
.gitignore, CLAUDE.md
Removes AGENTS.md from .gitignore so it is tracked, and adds CLAUDE.md with a copyright/license header pointing to @AGENTS.md.
Repository context and workflow guidance
AGENTS.md
Defines the monorepo context, upstream SDK references, package structure, design and submission checks, command conventions, sample app run commands, Lefthook expectations, Changesets release rules, contribution rules, and CI/CD workflow references.
Bridge patterns and code standards
AGENTS.md
Defines the Android, iOS, and TypeScript native bridge patterns, then establishes Swift, Kotlin, TypeScript, and shared native code standards plus verification and naming constraints.
Testing, documentation, licensing, and Git safety
AGENTS.md
Specifies documentation comment rules, testing placement and PingTestRunner onboarding, mandatory license headers for new files, and Git safety command restrictions.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A bunny hops in, ears perked up bright,
AGENTS now stands in the repo’s sight.
CLAUDE points the way with a tiny guide,
Rules, bridges, and tests all side by side. 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding AGENTS.md and CLAUDE.md for AI agent context.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch SDKS-5134-add-agents-md

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot 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.

🧹 Nitpick comments (2)
AGENTS.md (2)

51-68: 💤 Low value

Fix markdown heading hierarchy: #### Pre-submission checklist should be ###.

Line 62 jumps from h2 (## Design & Quality) directly to h4; markdown convention requires incremental level changes. Change to h3.

 - Call out potential security risks explicitly if present

-#### Pre-submission checklist
+### Pre-submission checklist
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@AGENTS.md` around lines 51 - 68, The markdown heading hierarchy in AGENTS.md
violates incremental level changes. The "Pre-submission checklist" heading is
currently at level 4 (####) but appears directly after a level 2 (##) heading,
skipping level 3. Change the "Pre-submission checklist" heading from four hashes
(####) to three hashes (###) to establish proper incremental heading progression
and follow markdown conventions.

121-127: 💤 Low value

Add language specifications to fenced code blocks.

Lines 123 and 137 have code blocks representing file layouts but lack a language identifier. Specify ```text for consistency with markdown linter expectations.

 ### Android layout (`packages/<pkg>/android/src/`)

-```
+```text
 main/       ← *Common.kt — shared implementation
 newarch/    ← *Module.kt (extends NativeXxxSpec) + *Package.kt
 oldarch/    ← *ClassicModule.kt (extends ReactContextBaseJavaModule) + *Package.kt
-```
+```text

And similarly for the iOS layout block at line 137:

 ### iOS layout (`packages/<pkg>/ios/`)

-```
+```text
 *Common.swift / *Impl.swift    ← shared Swift implementation
 RNPing*.mm                     ← TurboModule (ObjC++): implements getTurboModule:
 RNPing*Classic.mm              ← Classic bridge (ObjC): RCT_EXPORT_MODULE + RCT_EXPORT_METHOD
 RNPing*.h                      ← Header for classic bridge linking
-```
+```text

Also applies to: 135-142

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@AGENTS.md` around lines 121 - 127, The fenced code blocks representing the
Android layout directory structure and the iOS layout directory structure are
missing language identifiers in their opening backticks. Add `text` as the
language identifier by changing ``` to ```text for both the Android layout code
block (containing main/, newarch/, oldarch/ directory structure) and the iOS
layout code block (containing RNPing*.mm, RNPing*Classic.mm, and other file
references) to ensure compliance with markdown linter expectations.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@AGENTS.md`:
- Around line 51-68: The markdown heading hierarchy in AGENTS.md violates
incremental level changes. The "Pre-submission checklist" heading is currently
at level 4 (####) but appears directly after a level 2 (##) heading, skipping
level 3. Change the "Pre-submission checklist" heading from four hashes (####)
to three hashes (###) to establish proper incremental heading progression and
follow markdown conventions.
- Around line 121-127: The fenced code blocks representing the Android layout
directory structure and the iOS layout directory structure are missing language
identifiers in their opening backticks. Add `text` as the language identifier by
changing ``` to ```text for both the Android layout code block (containing
main/, newarch/, oldarch/ directory structure) and the iOS layout code block
(containing RNPing*.mm, RNPing*Classic.mm, and other file references) to ensure
compliance with markdown linter expectations.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6c3d7de3-be45-4914-834a-f168ae6e64af

📥 Commits

Reviewing files that changed from the base of the PR and between 48ff86d and 01356ab.

📒 Files selected for processing (3)
  • .gitignore
  • AGENTS.md
  • CLAUDE.md
💤 Files with no reviewable changes (1)
  • .gitignore

@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://ForgeRock.github.io/ping-react-native-sdk/docs-preview/pr-54/

Built to branch gh-pages at 2026-06-30 18:31 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Comment thread AGENTS.md
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
…(SDKS-5134)

Address CodeRabbit review comments:
- Fix h4 Pre-submission checklist heading to h3
- Add 'text' language identifier to Android and iOS layout code fences

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Comment thread AGENTS.md
Comment thread AGENTS.md Outdated
pingidentity-gaurav and others added 2 commits June 22, 2026 10:35
- Fix packages/core/src/ references → point to native source directories
- Add lazy module caching guidance to TypeScript bridge section
- Expand Git Safety with a comprehensive forbidden/allowed command list

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove Node <21 upper bound (Node >=20 only)
- Replace KDoc @remarks with plain NOTE comment guidance

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@rodrigoareis rodrigoareis 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.

Overall changes looks good. Left some comments.

Comment thread AGENTS.md
@@ -0,0 +1,346 @@
<!--

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.

I think we should drop license header for consistency with not having it for markdown files across the SDKs.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

All other markdown files in the repo (README.md, CONTRIBUTING.md, etc.) carry the same header, and the pre-commit hook enforces it on .md files (see lefthook.yml copyright job). Should we remove it from all of them and update the hook, or keep it as-is?

Comment thread CLAUDE.md
@@ -0,0 +1,8 @@
<!--

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.

I think we should drop license header for consistency with not having it for markdown files across the SDKs.

Comment thread CLAUDE.md Outdated
Comment thread AGENTS.md
- Do not invent or modify license headers
- If the correct license header is unclear, stop and ask before proceeding

## Git Safety

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.

This Git Safety section is nice, but there's no Contributing / branch strategy section about what a correct commit or PR looks like when an agent is helping a developer prepare one.

I would recommend have a look on ping-ios-sdk/AGENTS.md to add it here. It's also ok if you add those the details to the CONTRIBUTING.md and just point to use this as reference.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added a Contributing / Branch Strategy section above Git Safety covering: branch from main, changeset requirement (yarn changeset vs --empty), PR title format, and a pointer to CONTRIBUTING.md for the full workflow.

Comment thread AGENTS.md Outdated

- Packages live under `packages/*`; native code under `packages/*/android` and `packages/*/ios`
- Node `>=20`, Yarn 4 required
- `PingSampleApp` — reference app demonstrating SDK features (Journey, OIDC, FIDO, device binding, etc.); used for manual testing and development

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.

We have a Testing section later in this document with rich detail on PingTestRunner. I think we should also add a small section noting where the sample app lives (SampleApps/ or equivalent) and how to open it would help an agent orient itself.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added a note to the PingSampleApp bullet pointing to PingSampleApp/android for Android Studio and PingSampleApp/ios/PingSampleApp.xcworkspace for Xcode.

Comment thread AGENTS.md Outdated

# AGENTS.md

Guidance for AI coding agents working in this repository.

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.

Suggested change
Guidance for AI coding agents working in this repository.
This file provides guidance to AI coding agents (Claude Code, Cursor, GitHub Copilot, Gemini, etc.) when working with code in this repository. It follows the open AGENTS.md convention.
> **Note:** CLAUDE.md in this repository is a one-line redirect to AGENTS.md. Edit AGENTS.md only.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Applied your suggestion verbatim, also added the CLAUDE.md redirect note inline.

Comment thread AGENTS.md
- Make sure unit tests and integration tests are written
- Robolectric tests must always use `@Config(sdk = [29])`

### PingTestRunner integration

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.

It would be nice to also have a CI/CD section that lists each workflow file and its purpose (e.g. ci.yaml, build-and-test.yaml, browserstack-*.yaml, mend-cli-scan.yaml). An agent asked to "make this pass CI" or "add a new workflow step" has no pointer to .github/workflows/. A short table like the iOS one would close this gap.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added a CI/CD section at the end with a table covering all workflow files, their triggers, and their purpose, plus a note explaining that ci.yml is the top-level orchestrator and how to find the failing sub-workflow in the Actions log.

- Update AGENTS.md intro to follow open AGENTS.md convention wording
- Add sample app orientation note (Android Studio / Xcode paths)
- Add Contributing / Branch Strategy section
- Add CI/CD section with workflow table
- Update CLAUDE.md redirect text to "See @AGENTS.md"

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.92%. Comparing base (3e12dfa) to head (389e623).
⚠️ Report is 59 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main      #54      +/-   ##
============================================
- Coverage     51.39%   49.92%   -1.47%     
  Complexity       82       82              
============================================
  Files           189      152      -37     
  Lines         15597    13958    -1639     
  Branches        651      387     -264     
============================================
- Hits           8016     6969    -1047     
+ Misses         7514     6974     -540     
+ Partials         67       15      -52     
Flag Coverage Δ
android 9.83% <ø> (-0.06%) ⬇️
ios 56.65% <ø> (-0.10%) ⬇️
javascript ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants