chore(docs): add AGENTS.md and CLAUDE.md for AI agent context (SDKS-5134)#54
chore(docs): add AGENTS.md and CLAUDE.md for AI agent context (SDKS-5134)#54pingidentity-gaurav wants to merge 5 commits into
Conversation
…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>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthrough
ChangesAI Agent Guidance Documentation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
AGENTS.md (2)
51-68: 💤 Low valueFix markdown heading hierarchy:
#### Pre-submission checklistshould 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 valueAdd language specifications to fenced code blocks.
Lines 123 and 137 have code blocks representing file layouts but lack a language identifier. Specify
```textfor 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 -``` +```textAnd 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 -``` +```textAlso 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
📒 Files selected for processing (3)
.gitignoreAGENTS.mdCLAUDE.md
💤 Files with no reviewable changes (1)
- .gitignore
|
…(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>
- 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
left a comment
There was a problem hiding this comment.
Overall changes looks good. Left some comments.
| @@ -0,0 +1,346 @@ | |||
| <!-- | |||
There was a problem hiding this comment.
I think we should drop license header for consistency with not having it for markdown files across the SDKs.
There was a problem hiding this comment.
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?
| @@ -0,0 +1,8 @@ | |||
| <!-- | |||
There was a problem hiding this comment.
I think we should drop license header for consistency with not having it for markdown files across the SDKs.
| - Do not invent or modify license headers | ||
| - If the correct license header is unclear, stop and ask before proceeding | ||
|
|
||
| ## Git Safety |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
|
|
||
| - 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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Added a note to the PingSampleApp bullet pointing to PingSampleApp/android for Android Studio and PingSampleApp/ios/PingSampleApp.xcworkspace for Xcode.
|
|
||
| # AGENTS.md | ||
|
|
||
| Guidance for AI coding agents working in this repository. |
There was a problem hiding this comment.
| 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. |
There was a problem hiding this comment.
Applied your suggestion verbatim, also added the CLAUDE.md redirect note inline.
| - Make sure unit tests and integration tests are written | ||
| - Robolectric tests must always use `@Config(sdk = [29])` | ||
|
|
||
| ### PingTestRunner integration |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
AGENTS.mdat the repo root — the open-standard context file for AI coding agents (Claude, Copilot, Gemini, Codex, etc.)CLAUDE.mdas a one-line@AGENTS.mdredirect per the ticket's acceptance criteriaAGENTS.mdfrom.gitignoreso it is tracked going forwardWhat's in AGENTS.md
rn-push)TODO-PARITY)Summary by CodeRabbit
AGENTS.mdis no longer excluded from version control.