Two files, one repository
contentstack/contentstack-ios ships 2 formats across 5 indexed files. The question worth asking is whether the second one says anything the first does not.
CompareAGENTS.md ↔ Cursor rules
| Dimension | Shared | Only in A | Only in B | Overlap |
|---|---|---|---|---|
| Sections | 0 | 6 | 6 | 0% |
| Commands | 0 | 2 | 0 | 0% |
| Section tags | 0 | 2 | 5 | 0% |
What each file covers
Sections
0 shared · 6 only in A · 6 only in B- − Contentstack iOS CDA SDK – Agent Guide
- − Project
- − Tech stack
- − Main entry points
- − Commands
- − Rules and skills
- + Code Review Checklist – Contentstack iOS CDA SDK
- + API design and stability
- + Error handling and robustness
- + Dependencies and security
- + Testing
- + Severity (optional)
Commands
0 shared · 2 only in A · 0 only in B- − xcodebuild -project Contentstack.xcodeproj -scheme Contentstack -destination 'platform=iOS Simulator,name=<Device>' test
- − xcodebuild test
Section tags
0 shared · 2 only in A · 5 only in B- − do-not
- − agent-behaviour
- + test
- + git-pr
- + security
- + dependencies
- + api
Line diff
contentstack/contentstack-ios · AGENTS.md
@@ −1 @@
1# Contentstack iOS CDA SDK – Agent Guide
2
3This document is the main entry point for AI agents working in this repository.
4
5## Project
6
7- **Name:** Contentstack iOS CDA SDK (contentstack-ios)
8- **Purpose:** iOS client for the Contentstack **Content Delivery API (CDA)**. It fetches content (entries, assets, content types, sync, taxonomy) from Contentstack for iOS apps (Objective-C primary API; Swift-compatible headers).
9- **Repo:** [contentstack-ios](https://github.com/contentstack/contentstack-ios)
10
11## Tech stack
12
13- **Languages:** Objective-C (public SDK surface), with Swift-callable APIs via generated/bridged headers
14- **IDE / build:** Xcode, `Contentstack.xcodeproj`
15- **Distribution:** CocoaPods (`Contentstack.podspec`); no Swift Package Manager manifest in-repo today
16- **HTTP:** `NSURLSession` via `CSURLSessionManager` and `CSIOCoreHTTPNetworking` (internal)
17- **Testing:** XCTest, target **ContentstackTest** (`ContentstackTest.xctest`), scheme **Contentstack** (tests enabled; code coverage for **Contentstack** framework)
18
19## Main entry points
20
21- **`Contentstack`** – Factory: `+[Contentstack stackWithAPIKey:accessToken:environmentName:]` and `stackWithAPIKey:accessToken:environmentName:config:` return a **`Stack`**.
22- **`Stack`** – Main API surface: content types, entries, queries, assets, asset library, sync, taxonomy, etc.
23- **`Config`** – Optional settings: host, region, version (read-only where applicable), branch, URL session delegate, early access headers.
24- **Paths (source):** `Contentstack/` (public headers + implementation), `ContentstackInternal/` (HTTP, URLs, constants, internal helpers), `ThirdPartyExtension/` (networking session layer, markdown, ISO8601).
25- **Paths (tests):** `ContentstackTest/`
26
27## Commands
28
29- **Build framework:**
30 `xcodebuild -project Contentstack.xcodeproj -scheme Contentstack -destination 'generic/platform=iOS' -configuration Debug build`
31- **Run tests:**
32 `xcodebuild -project Contentstack.xcodeproj -scheme Contentstack -destination 'platform=iOS Simulator,name=<Device>' test`
33 Pick a simulator you have installed (e.g. **iPhone 16**). Tests may require **`ContentstackTest/config.json`** (or equivalent) with stack credentials for integration-style cases—do not commit secrets.
34- **CocoaPods lint (maintainers):**
35 `pod lib lint Contentstack.podspec`
36
37Use **Product → Test** in Xcode as an alternative to `xcodebuild test`.
38
39## Rules and skills
40
41- **`.cursor/rules/`** – Cursor rules for this repo:
42 - **README.md** – Index of all rules and when each applies.
43 - **dev-workflow.md** – Branches, tests, PR expectations.
44 - **ios.mdc** – Applies to SDK Objective-C sources: style, structure, naming.
45 - **contentstack-ios-cda.mdc** – Applies to SDK core: CDA patterns, Stack/Config, HTTP/retry, callbacks, CDA alignment.
46 - **testing.mdc** – Applies to **ContentstackTest**: XCTest naming, unit vs integration-style tests.
47 - **code-review.mdc** – Always applied: PR/review checklist (aligned with other Contentstack CDA SDKs).
48- **`skills/`** – Reusable skill docs:
49 - **contentstack-ios-cda** – CDA implementation and SDK core behavior.
50 - **testing** – Adding or refactoring tests.
51 - **code-review** – PR review or pre-submit checklist.
52 - **framework** – Config, HTTP session layer, retry behavior, and networking internals.
53
54Refer to `.cursor/rules/README.md` for the rule index and to `skills/README.md` for when to use each skill.
55
56For cross-SDK alignment, see the Java CDA SDK’s **AGENTS.md** and `.cursor/rules/` in [contentstack-java](https://github.com/contentstack/contentstack-java) (patterns are analogous; APIs and build tools differ).
57
contentstack/contentstack-ios · .cursor/rules/code-review.mdc
@@ +1 @@
1---
2description: PR and code review checklist – API stability, errors, compatibility, security, testing
3alwaysApply: true
4---
5
6# Code Review Checklist – Contentstack iOS CDA SDK
7
8Use this checklist when reviewing pull requests or before opening a PR.
9
10## API design and stability
11
12- [ ] **Public API:** New or changed public classes/methods/properties are necessary and documented (header comments / doc comments where the project documents API).
13- [ ] **Backward compatibility:** No breaking changes to public API unless explicitly called out and justified (e.g. major semver bump per release policy).
14- [ ] **Naming:** Method and type names are consistent with existing SDK style (Objective-C / Swift import names) and CDA terminology.
15
16## Error handling and robustness
17
18- [ ] **Errors:** API failures surface through existing patterns (`NSError **` out-parameters, failure blocks, or delegate callbacks as used in the touched code).
19- [ ] **Nullability:** `NS_ASSUME_NONNULL` / `nullable` annotations stay accurate; no unintended force-unwraps or ignored errors in new paths.
20- [ ] **Memory / threading:** Blocks and delegates retain cycles are avoided; main-queue vs background behavior matches existing networking code.
21
22## Dependencies and security
23
24- [ ] **Dependencies:** No new third-party or vendored code without justification; version bumps are intentional and do not introduce known vulnerabilities.
25- [ ] **SCA:** Address any security findings (e.g. from Snyk or similar) in the scope of the PR or in a follow-up.
26
27## Testing
28
29- [ ] **Coverage:** New or modified behavior is covered by XCTest unit and/or integration-style tests as appropriate.
30- [ ] **Test quality:** Tests are readable, stable (no flakiness), and follow project conventions (see **testing.mdc**).
31
32## Severity (optional)
33
34- **Blocker:** Must fix before merge (e.g. breaking public API without approval, security issue, no tests for new code).
35- **Major:** Should fix (e.g. inconsistent error handling, missing documentation on new public API).
36- **Minor:** Nice to fix (e.g. style, minor docs).
37
@@ −1 +1 @@
1−# Contentstack iOS CDA SDK – Agent Guide
1+---
2+description: PR and code review checklist – API stability, errors, compatibility, security, testing
3+alwaysApply: true
4+---
25
3−This document is the main entry point for AI agents working in this repository.
6+# Code Review Checklist – Contentstack iOS CDA SDK
47
5−## Project
8+Use this checklist when reviewing pull requests or before opening a PR.
69
7−- **Name:** Contentstack iOS CDA SDK (contentstack-ios)
8−- **Purpose:** iOS client for the Contentstack **Content Delivery API (CDA)**. It fetches content (entries, assets, content types, sync, taxonomy) from Contentstack for iOS apps (Objective-C primary API; Swift-compatible headers).
9−- **Repo:** [contentstack-ios](https://github.com/contentstack/contentstack-ios)
10+## API design and stability
1011
11−## Tech stack
12+- [ ] **Public API:** New or changed public classes/methods/properties are necessary and documented (header comments / doc comments where the project documents API).
13+- [ ] **Backward compatibility:** No breaking changes to public API unless explicitly called out and justified (e.g. major semver bump per release policy).
14+- [ ] **Naming:** Method and type names are consistent with existing SDK style (Objective-C / Swift import names) and CDA terminology.
1215
13−- **Languages:** Objective-C (public SDK surface), with Swift-callable APIs via generated/bridged headers
14−- **IDE / build:** Xcode, `Contentstack.xcodeproj`
15−- **Distribution:** CocoaPods (`Contentstack.podspec`); no Swift Package Manager manifest in-repo today
16−- **HTTP:** `NSURLSession` via `CSURLSessionManager` and `CSIOCoreHTTPNetworking` (internal)
17−- **Testing:** XCTest, target **ContentstackTest** (`ContentstackTest.xctest`), scheme **Contentstack** (tests enabled; code coverage for **Contentstack** framework)
16+## Error handling and robustness
1817
19−## Main entry points
18+- [ ] **Errors:** API failures surface through existing patterns (`NSError **` out-parameters, failure blocks, or delegate callbacks as used in the touched code).
19+- [ ] **Nullability:** `NS_ASSUME_NONNULL` / `nullable` annotations stay accurate; no unintended force-unwraps or ignored errors in new paths.
20+- [ ] **Memory / threading:** Blocks and delegates retain cycles are avoided; main-queue vs background behavior matches existing networking code.
2021
21−- **`Contentstack`** – Factory: `+[Contentstack stackWithAPIKey:accessToken:environmentName:]` and `stackWithAPIKey:accessToken:environmentName:config:` return a **`Stack`**.
22−- **`Stack`** – Main API surface: content types, entries, queries, assets, asset library, sync, taxonomy, etc.
23−- **`Config`** – Optional settings: host, region, version (read-only where applicable), branch, URL session delegate, early access headers.
24−- **Paths (source):** `Contentstack/` (public headers + implementation), `ContentstackInternal/` (HTTP, URLs, constants, internal helpers), `ThirdPartyExtension/` (networking session layer, markdown, ISO8601).
25−- **Paths (tests):** `ContentstackTest/`
22+## Dependencies and security
2623
27−## Commands
24+- [ ] **Dependencies:** No new third-party or vendored code without justification; version bumps are intentional and do not introduce known vulnerabilities.
25+- [ ] **SCA:** Address any security findings (e.g. from Snyk or similar) in the scope of the PR or in a follow-up.
2826
29−- **Build framework:**
30− `xcodebuild -project Contentstack.xcodeproj -scheme Contentstack -destination 'generic/platform=iOS' -configuration Debug build`
31−- **Run tests:**
32− `xcodebuild -project Contentstack.xcodeproj -scheme Contentstack -destination 'platform=iOS Simulator,name=<Device>' test`
33− Pick a simulator you have installed (e.g. **iPhone 16**). Tests may require **`ContentstackTest/config.json`** (or equivalent) with stack credentials for integration-style cases—do not commit secrets.
34−- **CocoaPods lint (maintainers):**
35− `pod lib lint Contentstack.podspec`
27+## Testing
3628
37−Use **Product → Test** in Xcode as an alternative to `xcodebuild test`.
29+- [ ] **Coverage:** New or modified behavior is covered by XCTest unit and/or integration-style tests as appropriate.
30+- [ ] **Test quality:** Tests are readable, stable (no flakiness), and follow project conventions (see **testing.mdc**).
3831
39−## Rules and skills
32+## Severity (optional)
4033
41−- **`.cursor/rules/`** – Cursor rules for this repo:
42− - **README.md** – Index of all rules and when each applies.
43− - **dev-workflow.md** – Branches, tests, PR expectations.
44− - **ios.mdc** – Applies to SDK Objective-C sources: style, structure, naming.
45− - **contentstack-ios-cda.mdc** – Applies to SDK core: CDA patterns, Stack/Config, HTTP/retry, callbacks, CDA alignment.
46− - **testing.mdc** – Applies to **ContentstackTest**: XCTest naming, unit vs integration-style tests.
47− - **code-review.mdc** – Always applied: PR/review checklist (aligned with other Contentstack CDA SDKs).
48−- **`skills/`** – Reusable skill docs:
49− - **contentstack-ios-cda** – CDA implementation and SDK core behavior.
50− - **testing** – Adding or refactoring tests.
51− - **code-review** – PR review or pre-submit checklist.
52− - **framework** – Config, HTTP session layer, retry behavior, and networking internals.
53−
54−Refer to `.cursor/rules/README.md` for the rule index and to `skills/README.md` for when to use each skill.
55−
56−For cross-SDK alignment, see the Java CDA SDK’s **AGENTS.md** and `.cursor/rules/` in [contentstack-java](https://github.com/contentstack/contentstack-java) (patterns are analogous; APIs and build tools differ).
34+- **Blocker:** Must fix before merge (e.g. breaking public API without approval, security issue, no tests for new code).
35+- **Major:** Should fix (e.g. inconsistent error handling, missing documentation on new public API).
36+- **Minor:** Nice to fix (e.g. style, minor docs).
5737
