Skip to content

Commit 8b45482

Browse files
Merge pull request #80 from contentstack/fix/dx-6045-update-cursor-rules-skills
docs(DX-6045): add AGENTS.md, skills, and Cursor rules entry
2 parents 64461ab + a3e5680 commit 8b45482

14 files changed

Lines changed: 128 additions & 413 deletions

File tree

.cursor/rules/README.md

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,5 @@
1-
# Cursor Rules – Contentstack iOS CDA SDK
1+
# Cursor (optional)
22

3-
This directory contains Cursor AI rules that apply when working in this repository. Rules provide persistent context so the AI follows project conventions and Contentstack CDA patterns.
3+
**Cursor** users: start at **[AGENTS.md](../../AGENTS.md)**. All conventions live in **`skills/*/SKILL.md`**.
44

5-
## How rules are applied
6-
7-
- **File-specific rules** use the `globs` frontmatter: they apply when you open or edit files matching that pattern.
8-
- **Always-on rules** use `alwaysApply: true`: they are included in every conversation in this project.
9-
10-
## Rule index
11-
12-
| File | Applies when | Purpose |
13-
|------|--------------|---------|
14-
| **dev-workflow.md** | (Reference only; no glob) | Development workflow: branches, running tests, PR expectations. Read for process guidance. |
15-
| **ios.mdc** | `Contentstack/`, `ContentstackInternal/`, `ThirdPartyExtension/` `*.h` / `*.m` | Objective-C standards: naming, module layout, headers vs implementation, nullability, consistency with existing SDK style. |
16-
| **contentstack-ios-cda.mdc** | `Contentstack/`, `ContentstackInternal/` `*.h` / `*.m` | CDA-specific patterns: Stack/Config, host/version/region/branch, HTTP entry points, retry behavior, blocks/callbacks, alignment with Content Delivery API. |
17-
| **testing.mdc** | `ContentstackTest/**/*.h`, `ContentstackTest/**/*.m` | XCTest patterns: test class naming, unit vs network/integration-style tests, fixtures (`config.json`), stability. |
18-
| **code-review.mdc** | Always | PR/review checklist: API stability, error handling, backward compatibility, dependencies and security (e.g. SCA). |
19-
20-
## Related
21-
22-
- **AGENTS.md** (repo root) – Main entry point for AI agents: project overview, entry points, commands, pointers to rules and skills.
23-
- **skills/** – Reusable skill docs (Contentstack iOS CDA, testing, code review, framework) for deeper guidance on specific tasks.
5+
This folder only points contributors to **`AGENTS.md`** so editor-specific config does not duplicate the canonical docs.

.cursor/rules/code-review.mdc

Lines changed: 0 additions & 36 deletions
This file was deleted.

.cursor/rules/contentstack-ios-cda.mdc

Lines changed: 0 additions & 36 deletions
This file was deleted.

.cursor/rules/dev-workflow.md

Lines changed: 0 additions & 27 deletions
This file was deleted.

.cursor/rules/ios.mdc

Lines changed: 0 additions & 43 deletions
This file was deleted.

.cursor/rules/testing.mdc

Lines changed: 0 additions & 33 deletions
This file was deleted.

AGENTS.md

Lines changed: 32 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,43 @@
1-
# Contentstack iOS CDA SDK – Agent Guide
1+
# Contentstack iOS (Objective-C) CDA SDK – Agent guide
22

3-
This document is the main entry point for AI agents working in this repository.
3+
**Universal entry point** for contributors and AI agents. Detailed conventions live in **`skills/*/SKILL.md`**.
44

5-
## Project
5+
## What this repo is
66

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)
7+
| Field | Detail |
8+
|--------|--------|
9+
| **Name:** | [contentstack-ios](https://github.com/contentstack/contentstack-ios) (CocoaPods **`Contentstack`**) |
10+
| **Purpose:** | Legacy **Objective-C** Content Delivery SDK for iOS; CocoaPods distribution. |
11+
| **Out of scope:** | **New** apps should use the **[Swift CDA SDK](https://github.com/contentstack/contentstack-swift)** (see `README.md` / `DEPRECATION.md`). This repo maintains existing integrations. |
1012

11-
## Tech stack
13+
## Tech stack (at a glance)
1214

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)
15+
| Area | Details |
16+
|------|---------|
17+
| Language | Objective-C (and supporting headers); Xcode project **`Contentstack.xcodeproj`** |
18+
| Build | Xcode; CocoaPods **`Contentstack.podspec`** |
19+
| Tests | XCTest targets in the Xcode project (see schemes) |
20+
| Lint / coverage | Follow Xcode warnings and team standards—no separate SwiftLint for primary Obj-C sources |
21+
| CI | `.github/workflows/check-branch.yml`, `policy-scan.yml`, `issues-jira.yml`, `release-package.yml` |
1822

19-
## Main entry points
23+
## Commands (quick reference)
2024

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/`
25+
| Command type | Command |
26+
|--------------|---------|
27+
| Xcode | Open **`Contentstack.xcodeproj`**, select scheme, **Cmd+B** / **Cmd+U** |
28+
| CocoaPods | `pod install` in consuming apps; podspec defines SDK surface |
2629

27-
## Commands
30+
## Where the documentation lives: skills
2831

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`
32+
| Skill | Path | What it covers |
33+
|-------|------|----------------|
34+
| **Development workflow** | [`skills/dev-workflow/SKILL.md`](skills/dev-workflow/SKILL.md) | Xcode project, CI, deprecation context |
35+
| **iOS CDA SDK (Obj-C)** | [`skills/contentstack-ios-cda/SKILL.md`](skills/contentstack-ios-cda/SKILL.md) | Classes, headers, CocoaPods API |
36+
| **Objective-C & layout** | [`skills/objective-c/SKILL.md`](skills/objective-c/SKILL.md) | Project structure, naming, modules |
37+
| **Testing** | [`skills/testing/SKILL.md`](skills/testing/SKILL.md) | XCTest in this repo |
38+
| **Build & platform** | [`skills/framework/SKILL.md`](skills/framework/SKILL.md) | Xcode settings, pods, iOS baselines |
39+
| **Code review** | [`skills/code-review/SKILL.md`](skills/code-review/SKILL.md) | PR checklist, migration messaging |
3640

37-
Use **Product → Test** in Xcode as an alternative to `xcodebuild test`.
41+
## Using Cursor (optional)
3842

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-
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).
43+
If you use **Cursor**, [`.cursor/rules/README.md`](.cursor/rules/README.md) only points to **`AGENTS.md`**—same docs as everyone else.

0 commit comments

Comments
 (0)